Skip to content

Commit 395b0fb

Browse files
committed
Bless tests
1 parent f482460 commit 395b0fb

6 files changed

+29
-18
lines changed

Diff for: tests/crashes/117877.rs

-13
This file was deleted.

Diff for: tests/ui/asm/const-resolve-error.rs

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
//@ edition:2021
2+
//@ needs-asm-support
3+
4+
use std::arch::asm;
5+
6+
async unsafe fn foo<'a>() {
7+
asm!("/* {0} */", const N); //~ ERROR E0425
8+
}
9+
10+
fn main() {}

Diff for: tests/ui/asm/const-resolve-error.stderr

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
error[E0425]: cannot find value `N` in this scope
2+
--> $DIR/const-resolve-error.rs:7:29
3+
|
4+
LL | asm!("/* {0} */", const N);
5+
| ^ not found in this scope
6+
|
7+
help: you might be missing a const parameter
8+
|
9+
LL | async unsafe fn foo<'a, const N: /* Type */>() {
10+
| +++++++++++++++++++++
11+
12+
error: aborting due to 1 previous error
13+
14+
For more information about this error, try `rustc --explain E0425`.

Diff for: tests/ui/asm/fail-const-eval-issue-121099.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ use std::arch::global_asm;
55

66
fn main() {}
77

8-
global_asm!("/* {} */", const 1 << 500); //~ ERROR evaluation of constant value failed [E0080]
8+
global_asm!("/* {} */", const 1 << 500); //~ ERROR E0080
99

10-
global_asm!("/* {} */", const 1 / 0); //~ ERROR evaluation of constant value failed [E0080]
10+
global_asm!("/* {} */", const 1 / 0); //~ ERROR E0080

Diff for: tests/ui/asm/fail-const-eval-issue-121099.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0080]: evaluation of constant value failed
1+
error[E0080]: evaluation of `{global_asm#0}::{constant#0}` failed
22
--> $DIR/fail-const-eval-issue-121099.rs:8:31
33
|
44
LL | global_asm!("/* {} */", const 1 << 500);
55
| ^^^^^^^^ attempt to shift left by `500_i32`, which would overflow
66

7-
error[E0080]: evaluation of constant value failed
7+
error[E0080]: evaluation of `{global_asm#1}::{constant#0}` failed
88
--> $DIR/fail-const-eval-issue-121099.rs:10:31
99
|
1010
LL | global_asm!("/* {} */", const 1 / 0);

Diff for: tests/ui/asm/invalid-const-operand.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ error: invalid type for `const` operand
8080
LL | asm!("{}", const &0);
8181
| ^^^^^^--
8282
| |
83-
| is a `&i32`
83+
| is a `&{integer}`
8484
|
8585
= help: `const` operands must be of an integer type
8686

0 commit comments

Comments
 (0)