2022-06-12 17:46:57 +02:00
|
|
|
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
|
2021-02-08 23:15:45 +01:00
|
|
|
--> $DIR/static-method-generic-inference.rs:24:25
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
2022-06-12 17:46:57 +02:00
|
|
|
LL | fn new() -> T;
|
|
|
|
| -------------- `HasNew::new` defined here
|
|
|
|
...
|
2018-08-08 14:28:26 +02:00
|
|
|
LL | let _f: base::Foo = base::HasNew::new();
|
2022-06-12 17:46:57 +02:00
|
|
|
| ^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
2019-10-29 17:28:39 -07:00
|
|
|
|
|
2022-06-12 17:46:57 +02:00
|
|
|
help: use the fully-qualified path to the only available implementation
|
|
|
|
|
|
2022-11-12 20:03:20 +00:00
|
|
|
LL | let _f: base::Foo = <Foo as base::HasNew>::new();
|
|
|
|
| +++++++ +
|
2018-08-08 14:28:26 +02:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
2022-06-12 17:46:57 +02:00
|
|
|
For more information about this error, try `rustc --explain E0790`.
|