fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #71365 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4fb7144ed15

1.43.0
705 B21 linesraw
1error[E0401]: can't use generic parameters from outer function
2  --> $DIR/issue-3214.rs:3:12
3   |
4LL | fn foo<T>() {
5   |    --- - type parameter from outer function
6   |    |
7   |    try adding a local generic parameter in this method instead
8LL |     struct Foo {
9LL |         x: T,
10   |            ^ use of generic parameter from outer function
11
12error[E0107]: wrong number of type arguments: expected 0, found 1
13  --> $DIR/issue-3214.rs:6:26
14   |
15LL |     impl<T> Drop for Foo<T> {
16   |                          ^ unexpected type argument
17
18error: aborting due to 2 previous errors
19
20Some errors have detailed explanations: E0107, E0401.
21For more information about an error, try `rustc --explain E0107`.