11error[E0435]: attempt to use a non-constant value in a constant
2- --> $DIR/type-check-1.rs:42 :26
2+ --> $DIR/type-check-1.rs:40 :26
33 |
44LL | let x = 0;
55 | ----- help: consider using `const` instead of `let`: `const x`
@@ -8,7 +8,7 @@ LL | asm!("{}", const x);
88 | ^ non-constant value
99
1010error[E0435]: attempt to use a non-constant value in a constant
11- --> $DIR/type-check-1.rs:45 :36
11+ --> $DIR/type-check-1.rs:43 :36
1212 |
1313LL | let x = 0;
1414 | ----- help: consider using `const` instead of `let`: `const x`
@@ -17,7 +17,7 @@ LL | asm!("{}", const const_foo(x));
1717 | ^ non-constant value
1818
1919error[E0435]: attempt to use a non-constant value in a constant
20- --> $DIR/type-check-1.rs:48 :36
20+ --> $DIR/type-check-1.rs:46 :36
2121 |
2222LL | let x = 0;
2323 | ----- help: consider using `const` instead of `let`: `const x`
@@ -26,7 +26,7 @@ LL | asm!("{}", const const_bar(x));
2626 | ^ non-constant value
2727
2828error: invalid `sym` operand
29- --> $DIR/type-check-1.rs:50 :24
29+ --> $DIR/type-check-1.rs:48 :24
3030 |
3131LL | asm!("{}", sym x);
3232 | ^ is a local variable
@@ -54,24 +54,6 @@ LL | asm!("{}", in(reg) v[..]);
5454 = help: the trait `Sized` is not implemented for `[u64]`
5555 = note: all inline asm arguments must have a statically known size
5656
57- error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
58- --> $DIR/type-check-1.rs:26:29
59- |
60- LL | asm!("{}", out(reg) v[..]);
61- | ^^^^^ doesn't have a size known at compile-time
62- |
63- = help: the trait `Sized` is not implemented for `[u64]`
64- = note: all inline asm arguments must have a statically known size
65-
66- error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
67- --> $DIR/type-check-1.rs:29:31
68- |
69- LL | asm!("{}", inout(reg) v[..]);
70- | ^^^^^ doesn't have a size known at compile-time
71- |
72- = help: the trait `Sized` is not implemented for `[u64]`
73- = note: all inline asm arguments must have a statically known size
74-
7557error: cannot use value of type `[u64]` for inline assembly
7658 --> $DIR/type-check-1.rs:23:28
7759 |
@@ -89,21 +71,21 @@ LL | asm!("{}", out(reg) v[..]);
8971 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
9072
9173error: cannot use value of type `[u64]` for inline assembly
92- --> $DIR/type-check-1.rs:29 :31
74+ --> $DIR/type-check-1.rs:28 :31
9375 |
9476LL | asm!("{}", inout(reg) v[..]);
9577 | ^^^^^
9678 |
9779 = note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
9880
9981error[E0308]: mismatched types
100- --> $DIR/type-check-1.rs:58 :26
82+ --> $DIR/type-check-1.rs:56 :26
10183 |
10284LL | asm!("{}", const 0f32);
10385 | ^^^^ expected integer, found `f32`
10486
10587error[E0308]: mismatched types
106- --> $DIR/type-check-1.rs:60 :26
88+ --> $DIR/type-check-1.rs:58 :26
10789 |
10890LL | asm!("{}", const 0 as *mut u8);
10991 | ^^^^^^^^^^^^ expected integer, found *-ptr
@@ -112,7 +94,7 @@ LL | asm!("{}", const 0 as *mut u8);
11294 found raw pointer `*mut u8`
11395
11496error[E0308]: mismatched types
115- --> $DIR/type-check-1.rs:62 :26
97+ --> $DIR/type-check-1.rs:60 :26
11698 |
11799LL | asm!("{}", const &0);
118100 | ^^ expected integer, found `&{integer}`
@@ -124,21 +106,21 @@ LL + asm!("{}", const 0);
124106 |
125107
126108error[E0308]: mismatched types
127- --> $DIR/type-check-1.rs:76 :25
109+ --> $DIR/type-check-1.rs:74 :25
128110 |
129111LL | global_asm!("{}", const 0f32);
130112 | ^^^^ expected integer, found `f32`
131113
132114error[E0308]: mismatched types
133- --> $DIR/type-check-1.rs:78 :25
115+ --> $DIR/type-check-1.rs:76 :25
134116 |
135117LL | global_asm!("{}", const 0 as *mut u8);
136118 | ^^^^^^^^^^^^ expected integer, found *-ptr
137119 |
138120 = note: expected type `{integer}`
139121 found raw pointer `*mut u8`
140122
141- error: aborting due to 17 previous errors
123+ error: aborting due to 15 previous errors
142124
143125Some errors have detailed explanations: E0277, E0308, E0435.
144126For more information about an error, try `rustc --explain E0277`.
0 commit comments