11error[E0412]: cannot find type `T` in this scope
2- --> $DIR/bad-params.rs:4 :34
2+ --> $DIR/bad-params.rs:3 :34
33 |
44LL | fn missing() -> impl Sized + use<T> {}
55 | ^ not found in this scope
@@ -10,37 +10,28 @@ LL | fn missing<T>() -> impl Sized + use<T> {}
1010 | +++
1111
1212error[E0411]: cannot find type `Self` in this scope
13- --> $DIR/bad-params.rs:7 :39
13+ --> $DIR/bad-params.rs:6 :39
1414 |
1515LL | fn missing_self() -> impl Sized + use<Self> {}
1616 | ------------ ^^^^ `Self` is only available in impls, traits, and type definitions
1717 | |
1818 | `Self` not allowed in a function
1919
20- warning: the feature `precise_capturing` is incomplete and may not be safe to use and/or cause compiler crashes
21- --> $DIR/bad-params.rs:1:12
22- |
23- LL | #![feature(precise_capturing)]
24- | ^^^^^^^^^^^^^^^^^
25- |
26- = note: see issue #123432 <https://github.com/rust-lang/rust/issues/123432> for more information
27- = note: `#[warn(incomplete_features)]` on by default
28-
2920error: `Self` can't be captured in `use<...>` precise captures list, since it is an alias
30- --> $DIR/bad-params.rs:12 :48
21+ --> $DIR/bad-params.rs:11 :48
3122 |
3223LL | impl MyType {
3324 | ----------- `Self` is not a generic argument, but an alias to the type of the implementation
3425LL | fn self_is_not_param() -> impl Sized + use<Self> {}
3526 | ^^^^
3627
3728error: expected type or const parameter in `use<...>` precise captures list, found function
38- --> $DIR/bad-params.rs:16 :32
29+ --> $DIR/bad-params.rs:15 :32
3930 |
4031LL | fn hello() -> impl Sized + use<hello> {}
4132 | ^^^^^
4233
43- error: aborting due to 4 previous errors; 1 warning emitted
34+ error: aborting due to 4 previous errors
4435
4536Some errors have detailed explanations: E0411, E0412.
4637For more information about an error, try `rustc --explain E0411`.
0 commit comments