You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
suggesting for traits to import are not prefaced with crate in Rust 2018 #54559
Consider this test case in Rust 2018 (playground):
mod foo {pub(crate)traitBar{fnbar(&self){}}implBarforu32{}}fnmain(){let x:u32 = 22;
x.bar();}
I get this error:
error[E0599]: no method named `bar` found for type `u32` in the current scope
--> src/main.rs:11:7
|
11 | x.bar();
| ^^^
|
= help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope, perhaps add a `use` for it:
|
1 | use foo::Bar;
|
Activity
nikomatsakis commentedon Sep 25, 2018
cc @Mark-Simulacrum @Centril — Rust 2018 related bug, not sure how best to label/triage
Mark-Simulacrum commentedon Sep 25, 2018
Cc @alexcrichton @eddyb - I think there might already be a similar bug elsewhere, not sure
Rollup merge of rust-lang#54603 - davidtwco:issue-54559, r=nikomatsakis
Rollup merge of rust-lang#54603 - davidtwco:issue-54559, r=nikomatsakis