File tree Expand file tree Collapse file tree 4 files changed +90
-0
lines changed
src/test/ui/impl-trait/issues Expand file tree Collapse file tree 4 files changed +90
-0
lines changed Original file line number Diff line number Diff line change 1+ // edition:2018
2+
3+ #![ feature( impl_trait_in_bindings) ]
4+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete
5+
6+ struct Bug {
7+ V1 : [ ( ) ; {
8+ let f: impl core:: future:: Future < Output = u8 > = async { 1 } ;
9+ //~^ ERROR `async` blocks are not allowed in constants
10+ //~| ERROR destructors cannot be evaluated at compile-time
11+ 1
12+ } ] ,
13+ }
14+
15+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/issue-78721.rs:3:12
3+ |
4+ LL | #![feature(impl_trait_in_bindings)]
5+ | ^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: `#[warn(incomplete_features)]` on by default
8+ = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
9+
10+ error: `async` blocks are not allowed in constants
11+ --> $DIR/issue-78721.rs:8:57
12+ |
13+ LL | let f: impl core::future::Future<Output = u8> = async { 1 };
14+ | ^^^^^^^^^^^
15+
16+ error[E0493]: destructors cannot be evaluated at compile-time
17+ --> $DIR/issue-78721.rs:8:13
18+ |
19+ LL | let f: impl core::future::Future<Output = u8> = async { 1 };
20+ | ^ constants cannot evaluate destructors
21+ ...
22+ LL | }],
23+ | - value is dropped here
24+
25+ error: aborting due to 2 previous errors; 1 warning emitted
26+
27+ For more information about this error, try `rustc --explain E0493`.
Original file line number Diff line number Diff line change 1+ // edition:2018
2+
3+ #![ feature( type_alias_impl_trait) ]
4+ #![ feature( impl_trait_in_bindings) ]
5+ //~^ WARN the feature `impl_trait_in_bindings` is incomplete
6+
7+ type F = impl core:: future:: Future < Output = u8 > ;
8+
9+ struct Bug {
10+ V1 : [ ( ) ; {
11+ fn concrete_use ( ) -> F {
12+ async { }
13+ }
14+ let f: F = async { 1 } ;
15+ //~^ ERROR `async` blocks are not allowed in constants
16+ //~| ERROR destructors cannot be evaluated at compile-time
17+ 1
18+ } ] ,
19+ }
20+
21+ fn main ( ) { }
Original file line number Diff line number Diff line change 1+ warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes
2+ --> $DIR/issue-78722.rs:4:12
3+ |
4+ LL | #![feature(impl_trait_in_bindings)]
5+ | ^^^^^^^^^^^^^^^^^^^^^^
6+ |
7+ = note: `#[warn(incomplete_features)]` on by default
8+ = note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information
9+
10+ error: `async` blocks are not allowed in constants
11+ --> $DIR/issue-78722.rs:14:20
12+ |
13+ LL | let f: F = async { 1 };
14+ | ^^^^^^^^^^^
15+
16+ error[E0493]: destructors cannot be evaluated at compile-time
17+ --> $DIR/issue-78722.rs:14:13
18+ |
19+ LL | let f: F = async { 1 };
20+ | ^ constants cannot evaluate destructors
21+ ...
22+ LL | }],
23+ | - value is dropped here
24+
25+ error: aborting due to 2 previous errors; 1 warning emitted
26+
27+ For more information about this error, try `rustc --explain E0493`.
You can’t perform that action at this time.
0 commit comments