rust/src/test/ui/error-codes/E0401.stderr

36 lines
1.3 KiB
Plaintext
Raw Normal View History

2018-02-07 15:26:35 +00:00
error[E0401]: can't use type parameters from outer function
--> $DIR/E0401.rs:14:38
2018-02-08 03:35:35 +00:00
|
2018-02-07 15:26:35 +00:00
LL | fn foo<T>(x: T) {
| - type variable from outer function
LL | fn bar<U, V: Baz<U>, W: Fn()>(y: T) { //~ ERROR E0401
| -------------------------- ^ use of type variable from outer function
| |
| help: try using a local type parameter instead: `bar<U, V: Baz<U>, W: Fn(), T>`
2018-02-08 03:35:35 +00:00
2018-02-07 15:26:35 +00:00
error[E0401]: can't use type parameters from outer function
--> $DIR/E0401.rs:19:16
|
LL | fn foo<T>(x: T) {
| - type variable from outer function
...
LL | (y: T) { //~ ERROR E0401
| ^ use of type variable from outer function
|
= help: try using a local type parameter instead
error[E0401]: can't use type parameters from outer function
--> $DIR/E0401.rs:32:25
|
LL | impl<T> Iterator for A<T> {
| ---- `Self` type implicitely declared here, on the `impl`
...
LL | fn helper(sel: &Self) -> u8 { //~ ERROR E0401
| ------ ^^^^ use of type variable from outer function
| |
| help: try using a local type parameter instead: `helper<Self>`
error: aborting due to 3 previous errors
2018-02-08 03:35:35 +00:00
2018-02-19 20:40:25 +00:00
If you want more information on this error, try using "rustc --explain E0401"