2018-08-08 12:28:26 +00:00
|
|
|
error[E0574]: expected struct, variant or union type, found type parameter `T`
|
2018-12-25 15:56:47 +00:00
|
|
|
--> $DIR/lexical-scopes.rs:3:13
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-10-16 08:59:28 +00:00
|
|
|
LL | struct T { i: i32 }
|
2022-10-25 22:50:11 +00:00
|
|
|
| - you might have meant to refer to this struct
|
2022-08-16 19:53:06 +00:00
|
|
|
LL | fn f<T>() {
|
2022-09-21 23:32:37 +00:00
|
|
|
| - found this type parameter
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | let t = T { i: 0 };
|
2018-08-08 12:28:26 +00:00
|
|
|
| ^ not a struct, variant or union type
|
|
|
|
|
2020-01-08 16:05:31 +00:00
|
|
|
error[E0599]: no function or associated item named `f` found for type parameter `Foo` in the current scope
|
2018-12-07 18:15:36 +00:00
|
|
|
--> $DIR/lexical-scopes.rs:10:10
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2022-06-20 15:43:20 +00:00
|
|
|
LL | fn g<Foo>() {
|
|
|
|
| --- function or associated item `f` not found for this type parameter
|
2019-03-09 12:03:44 +00:00
|
|
|
LL | Foo::f();
|
2019-03-10 23:20:15 +00:00
|
|
|
| ^ function or associated item not found in `Foo`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
|
2019-10-11 13:23:18 +00:00
|
|
|
Some errors have detailed explanations: E0574, E0599.
|
|
|
|
For more information about an error, try `rustc --explain E0574`.
|