]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/trait_items.stderr
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[rust.git] / src / test / ui / hygiene / trait_items.stderr
1 error[E0599]: no method named `f` found for unit type `()` in the current scope
2   --> $DIR/trait_items.rs:17:24
3    |
4 LL |         fn f(&self) {}
5    |            - the method is available for `()` here
6 ...
7 LL |     fn f() { ::baz::m!(); }
8    |              ----------- in this macro invocation
9 ...
10 LL |     pub macro m() { ().f() }
11    |                        ^ method not found in `()`
12    |
13    = help: items from traits can only be used if the trait is in scope
14    = note: this error originates in the macro `::baz::m` (in Nightly builds, run with -Z macro-backtrace for more info)
15 help: the following trait is implemented but not in scope; perhaps add a `use` for it:
16    |
17 LL |     use foo::T;
18    |
19
20 error: aborting due to previous error
21
22 For more information about this error, try `rustc --explain E0599`.