fix span of stack size error

This commit is contained in:
Ralf Jung 2020-08-12 10:18:21 +02:00
parent a505e773a5
commit fd32fe9bb9
5 changed files with 22 additions and 19 deletions

View file

@ -1,11 +1,11 @@
// build-fail
pub const unsafe fn fake_type<T>() -> T {
hint_unreachable() //~ ERROR evaluation of constant value failed
hint_unreachable()
}
pub const unsafe fn hint_unreachable() -> ! {
fake_type()
fake_type() //~ ERROR evaluation of constant value failed
}
trait Const {

View file

@ -1,11 +1,9 @@
error[E0080]: evaluation of constant value failed
--> $DIR/uninhabited-const-issue-61744.rs:4:5
--> $DIR/uninhabited-const-issue-61744.rs:8:5
|
LL | hint_unreachable()
| ^^^^^^^^^^^^^^^^^^
| ------------------
| |
| reached the configured maximum number of stack frames
| inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5
| inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5
| inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5
| inside `fake_type::<!>` at $DIR/uninhabited-const-issue-61744.rs:4:5
@ -72,8 +70,9 @@ LL | hint_unreachable()
| inside `fake_type::<i32>` at $DIR/uninhabited-const-issue-61744.rs:4:5
...
LL | fake_type()
| -----------
| ^^^^^^^^^^^
| |
| reached the configured maximum number of stack frames
| inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5
| inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5
| inside `hint_unreachable` at $DIR/uninhabited-const-issue-61744.rs:8:5