2022-06-12 15:46:57 +00:00
|
|
|
error[E0790]: cannot call associated function on trait without specifying the corresponding `impl` type
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/static-method-generic-inference.rs:24:25
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-06-12 15:46:57 +00:00
|
|
|
LL | fn new() -> T;
|
|
|
|
| -------------- `HasNew::new` defined here
|
|
|
|
...
|
2018-08-08 12:28:26 +00:00
|
|
|
LL | let _f: base::Foo = base::HasNew::new();
|
2024-01-24 02:52:29 +00:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait
|
2019-10-30 00:28:39 +00:00
|
|
|
|
|
2022-06-12 15:46:57 +00: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 12:28:26 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2022-06-12 15:46:57 +00:00
|
|
|
For more information about this error, try `rustc --explain E0790`.
|