]> git.proxmox.com Git - rustc.git/blame - tests/ui/traits/static-method-generic-inference.stderr
New upstream version 1.76.0+dfsg1
[rustc.git] / tests / ui / traits / static-method-generic-inference.stderr
CommitLineData
064997fb 1error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
6a06907d 2 --> $DIR/static-method-generic-inference.rs:24:25
b7449926 3 |
064997fb
FG
4LL | fn new() -> T;
5 | -------------- `HasNew::new` defined here
6...
b7449926 7LL | let _f: base::Foo = base::HasNew::new();
064997fb 8 | ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
60c5eb7d 9 |
064997fb
FG
10help: use the fully-qualified path to the only available implementation
11 |
9c376795
FG
12LL | let _f: base::Foo = <Foo as base::HasNew>::new();
13 | +++++++ +
b7449926 14
4b012472 15error: aborting due to 1 previous error
b7449926 16
064997fb 17For more information about this error, try `rustc --explain E0790`.