File tree Expand file tree Collapse file tree 4 files changed +47
-0
lines changed
tests/ui/impl-trait/precise-capturing Expand file tree Collapse file tree 4 files changed +47
-0
lines changed Original file line number Diff line number Diff line change 1+ //@ check-pass
2+
3+ #![ feature( precise_capturing_of_types) ]
4+ //~^ WARN the feature `precise_capturing_of_types` is incomplete
5+
6+ fn uncaptured < T > ( ) -> impl Sized + use < > { }
7+
8+ fn main ( ) {
9+ let mut x = uncaptured :: < i32 > ( ) ;
10+ x = uncaptured :: < u32 > ( ) ;
11+ }
Original file line number Diff line number Diff line change 1+ warning: the feature `precise_capturing_of_types` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/of-types-eq-uncaptured.rs:3:12
3+ |
4+ LL | #![feature(precise_capturing_of_types)]
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: see issue #130043 <https://github.com/rust-lang/rust/issues/130043> for more information
8+ = note: `#[warn(incomplete_features)]` on by default
9+
10+ warning: 1 warning emitted
11+
Original file line number Diff line number Diff line change 1+ //@ check-pass
2+
3+ #![ feature( precise_capturing_of_types) ]
4+ //~^ WARN the feature `precise_capturing_of_types` is incomplete
5+
6+ fn uncaptured < T > ( ) -> impl Sized + use < > { }
7+
8+ fn outlives_static < T : ' static > ( _: T ) { }
9+
10+ fn foo < ' a > ( ) {
11+ outlives_static ( uncaptured :: < & ' a ( ) > ( ) ) ;
12+ }
13+
14+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: the feature `precise_capturing_of_types` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/of-types-outlives.rs:3:12
3+ |
4+ LL | #![feature(precise_capturing_of_types)]
5+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: see issue #130043 <https://github.com/rust-lang/rust/issues/130043> for more information
8+ = note: `#[warn(incomplete_features)]` on by default
9+
10+ warning: 1 warning emitted
11+
You can’t perform that action at this time.
0 commit comments