]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/static-method-generic-inference.stderr
:arrow_up: rust-analyzer
[rust.git] / src / test / ui / traits / static-method-generic-inference.stderr
1 error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
2   --> $DIR/static-method-generic-inference.rs:24:25
3    |
4 LL |         fn new() -> T;
5    |         -------------- `HasNew::new` defined here
6 ...
7 LL |     let _f: base::Foo = base::HasNew::new();
8    |                         ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
9    |
10 help: use the fully-qualified path to the only available implementation
11    |
12 LL |     let _f: base::Foo = base::<Foo as HasNew>::new();
13    |                               +++++++       +
14
15 error: aborting due to previous error
16
17 For more information about this error, try `rustc --explain E0790`.