]>
git.proxmox.com Git - rustc.git/blob - tests/ui/imports/unnamed_pub_trait.rs
1 // aux-build:unnamed_pub_trait_source.rs
4 * This crate declares an unnameable public path for our item. Make sure we don't suggest
5 * importing it by name, and instead we suggest importing it by glob.
7 extern crate unnamed_pub_trait_source
;
8 //~^ HELP the following trait is implemented but not in scope; perhaps add a `use` for it:
9 //~| SUGGESTION unnamed_pub_trait_source::prelude::*; // trait Tr
12 use unnamed_pub_trait_source
::S
;
14 //~^ ERROR no method named `method` found for struct `S` in the current scope [E0599]
15 //~| HELP items from traits can only be used if the trait is in scope