2023-09-10 23:06:14 +02:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/E0401.rs:4:39
|
2018-02-07 19:35:35 -08:00
|
|
|
|
|
2018-02-07 16:26:35 +01:00
|
|
|
LL | fn foo<T>(x: T) {
|
2023-09-10 23:06:14 +02:00
|
|
|
| - type parameter from outer item
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | fn bfnr<U, V: Baz<U>, W: Fn()>(y: T) {
|
2023-09-10 23:06:14 +02:00
|
|
|
| - ^ use of generic parameter from outer item
|
2022-07-14 15:09:30 +02:00
|
|
|
| |
|
2023-09-10 23:06:14 +02:00
|
|
|
| help: try introducing a local generic parameter here: `T,`
|
2018-02-07 19:35:35 -08:00
|
|
|
|
2023-09-10 23:06:14 +02:00
|
|
|
error[E0401]: can't use generic parameters from outer item
|
2018-12-25 08:56:47 -07:00
|
|
|
--> $DIR/E0401.rs:9:16
|
2018-02-07 16:26:35 +01:00
|
|
|
|
|
|
|
|
|
LL | fn foo<T>(x: T) {
|
2023-09-10 23:06:14 +02:00
|
|
|
| - type parameter from outer item
|
2018-02-07 16:26:35 +01:00
|
|
|
...
|
2018-03-13 22:58:45 -07:00
|
|
|
LL | fn baz<U,
|
2023-09-10 23:06:14 +02:00
|
|
|
| - help: try introducing a local generic parameter here: `T,`
|
2018-03-13 22:58:45 -07:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | (y: T) {
|
2023-09-10 23:06:14 +02:00
|
|
|
| ^ use of generic parameter from outer item
|
2018-02-07 16:26:35 +01:00
|
|
|
|
2024-01-13 19:24:52 +00:00
|
|
|
error[E0401]: can't use `Self` from outer item
|
2024-02-10 23:11:01 +01:00
|
|
|
--> $DIR/E0401.rs:22:25
|
2018-02-07 16:26:35 +01:00
|
|
|
|
|
|
|
|
|
LL | impl<T> Iterator for A<T> {
|
2018-09-05 09:56:01 -07:00
|
|
|
| ---- `Self` type implicitly declared here, by this `impl`
|
2018-02-07 16:26:35 +01:00
|
|
|
...
|
2019-03-09 15:03:44 +03:00
|
|
|
LL | fn helper(sel: &Self) -> u8 {
|
2018-09-04 10:41:33 -07:00
|
|
|
| ^^^^
|
|
|
|
|
| |
|
2024-01-13 19:24:52 +00:00
|
|
|
| use of `Self` from outer item
|
2023-09-10 23:06:14 +02:00
|
|
|
| refer to the type directly here instead
|
2018-02-07 16:26:35 +01:00
|
|
|
|
2024-02-10 23:11:01 +01:00
|
|
|
error: aborting due to 3 previous errors
|
2018-02-07 19:35:35 -08:00
|
|
|
|
2024-02-10 23:11:01 +01:00
|
|
|
For more information about this error, try `rustc --explain E0401`.
|