forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of rust-lang#79102 - Alexendoo:ice-regression-tests, r=M…
…ark-Simulacrum Add two regression tests For rust-lang#78721 and rust-lang#78722
- Loading branch information
Showing
4 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// edition:2018 | ||
|
||
#![feature(impl_trait_in_bindings)] | ||
//~^ WARN the feature `impl_trait_in_bindings` is incomplete | ||
|
||
struct Bug { | ||
V1: [(); { | ||
let f: impl core::future::Future<Output = u8> = async { 1 }; | ||
//~^ ERROR `async` blocks are not allowed in constants | ||
//~| ERROR destructors cannot be evaluated at compile-time | ||
1 | ||
}], | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/issue-78721.rs:3:12 | ||
| | ||
LL | #![feature(impl_trait_in_bindings)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(incomplete_features)]` on by default | ||
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information | ||
|
||
error: `async` blocks are not allowed in constants | ||
--> $DIR/issue-78721.rs:8:57 | ||
| | ||
LL | let f: impl core::future::Future<Output = u8> = async { 1 }; | ||
| ^^^^^^^^^^^ | ||
|
||
error[E0493]: destructors cannot be evaluated at compile-time | ||
--> $DIR/issue-78721.rs:8:13 | ||
| | ||
LL | let f: impl core::future::Future<Output = u8> = async { 1 }; | ||
| ^ constants cannot evaluate destructors | ||
... | ||
LL | }], | ||
| - value is dropped here | ||
|
||
error: aborting due to 2 previous errors; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0493`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
// edition:2018 | ||
|
||
#![feature(type_alias_impl_trait)] | ||
#![feature(impl_trait_in_bindings)] | ||
//~^ WARN the feature `impl_trait_in_bindings` is incomplete | ||
|
||
type F = impl core::future::Future<Output = u8>; | ||
|
||
struct Bug { | ||
V1: [(); { | ||
fn concrete_use() -> F { | ||
async {} | ||
} | ||
let f: F = async { 1 }; | ||
//~^ ERROR `async` blocks are not allowed in constants | ||
//~| ERROR destructors cannot be evaluated at compile-time | ||
1 | ||
}], | ||
} | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
warning: the feature `impl_trait_in_bindings` is incomplete and may not be safe to use and/or cause compiler crashes | ||
--> $DIR/issue-78722.rs:4:12 | ||
| | ||
LL | #![feature(impl_trait_in_bindings)] | ||
| ^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: `#[warn(incomplete_features)]` on by default | ||
= note: see issue #63065 <https://github.com/rust-lang/rust/issues/63065> for more information | ||
|
||
error: `async` blocks are not allowed in constants | ||
--> $DIR/issue-78722.rs:14:20 | ||
| | ||
LL | let f: F = async { 1 }; | ||
| ^^^^^^^^^^^ | ||
|
||
error[E0493]: destructors cannot be evaluated at compile-time | ||
--> $DIR/issue-78722.rs:14:13 | ||
| | ||
LL | let f: F = async { 1 }; | ||
| ^ constants cannot evaluate destructors | ||
... | ||
LL | }], | ||
| - value is dropped here | ||
|
||
error: aborting due to 2 previous errors; 1 warning emitted | ||
|
||
For more information about this error, try `rustc --explain E0493`. |