11error[E0435]: attempt to use a non-constant value in a constant
2- --> $DIR/invalid-const-operand.rs:45 :26
2+ --> $DIR/invalid-const-operand.rs:51 :26
33 |
44LL | asm!("{}", const x);
55 | ^ non-constant value
@@ -11,7 +11,7 @@ LL + const x: /* Type */ = 0;
1111 |
1212
1313error[E0435]: attempt to use a non-constant value in a constant
14- --> $DIR/invalid-const-operand.rs:48 :36
14+ --> $DIR/invalid-const-operand.rs:54 :36
1515 |
1616LL | asm!("{}", const const_foo(x));
1717 | ^ non-constant value
@@ -23,7 +23,7 @@ LL + const x: /* Type */ = 0;
2323 |
2424
2525error[E0435]: attempt to use a non-constant value in a constant
26- --> $DIR/invalid-const-operand.rs:51 :36
26+ --> $DIR/invalid-const-operand.rs:57 :36
2727 |
2828LL | asm!("{}", const const_bar(x));
2929 | ^ non-constant value
@@ -35,55 +35,35 @@ LL + const x: /* Type */ = 0;
3535 |
3636
3737error: invalid type for `const` operand
38- --> $DIR/invalid-const-operand.rs:13 :19
38+ --> $DIR/invalid-const-operand.rs:15 :19
3939 |
4040LL | global_asm!("{}", const 0f32);
4141 | ^^^^^^----
4242 | |
4343 | is an `f32`
4444 |
45- = help: `const` operands must be of an integer type
46-
47- error: invalid type for `const` operand
48- --> $DIR/invalid-const-operand.rs:15:19
49- |
50- LL | global_asm!("{}", const 0 as *mut u8);
51- | ^^^^^^------------
52- | |
53- | is a `*mut u8`
54- |
55- = help: `const` operands must be of an integer type
45+ = help: `const` operands must be of an integer or thin pointer type
5646
5747error: invalid type for `const` operand
58- --> $DIR/invalid-const-operand.rs:25 :20
48+ --> $DIR/invalid-const-operand.rs:26 :20
5949 |
6050LL | asm!("{}", const 0f32);
6151 | ^^^^^^----
6252 | |
6353 | is an `f32`
6454 |
65- = help: `const` operands must be of an integer type
66-
67- error: invalid type for `const` operand
68- --> $DIR/invalid-const-operand.rs:27:20
69- |
70- LL | asm!("{}", const 0 as *mut u8);
71- | ^^^^^^------------
72- | |
73- | is a `*mut u8`
74- |
75- = help: `const` operands must be of an integer type
55+ = help: `const` operands must be of an integer or thin pointer type
7656
7757error: invalid type for `const` operand
78- --> $DIR/invalid-const-operand.rs:29 :20
58+ --> $DIR/invalid-const-operand.rs:30 :20
7959 |
80- LL | asm!("{}", const &0 );
81- | ^^^^^^--
60+ LL | asm!("{}", const b"Foo".as_slice() );
61+ | ^^^^^^-----------------
8262 | |
83- | is a `&i32 `
63+ | is a `&[u8] `
8464 |
85- = help: `const` operands must be of an integer type
65+ = help: `const` operands must be of an integer or thin pointer type
8666
87- error: aborting due to 8 previous errors
67+ error: aborting due to 6 previous errors
8868
8969For more information about this error, try `rustc --explain E0435`.
0 commit comments