rust/tests/ui/traits/static-method-generic-inference.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
690 B
Plaintext
Raw Normal View History

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
|
LL | fn new() -> T;
| -------------- `HasNew::new` defined here
...
2018-08-08 12:28:26 +00:00
LL | let _f: base::Foo = base::HasNew::new();
| ^^^^^^^^^^^^^^^^^^^ cannot call associated function of trait
2019-10-30 00:28:39 +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
error: aborting due to 1 previous error
2018-08-08 12:28:26 +00:00
For more information about this error, try `rustc --explain E0790`.