1
1
error[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
3
3
|
4
4
LL | let x = 0;
5
5
| ----- help: consider using `const` instead of `let`: `const x`
@@ -8,7 +8,7 @@ LL | asm!("{}", const x);
8
8
| ^ non-constant value
9
9
10
10
error[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
12
12
|
13
13
LL | let x = 0;
14
14
| ----- help: consider using `const` instead of `let`: `const x`
@@ -17,7 +17,7 @@ LL | asm!("{}", const const_foo(x));
17
17
| ^ non-constant value
18
18
19
19
error[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
21
21
|
22
22
LL | let x = 0;
23
23
| ----- help: consider using `const` instead of `let`: `const x`
@@ -26,7 +26,7 @@ LL | asm!("{}", const const_bar(x));
26
26
| ^ non-constant value
27
27
28
28
error: invalid `sym` operand
29
- --> $DIR/type-check-1.rs:50 :24
29
+ --> $DIR/type-check-1.rs:48 :24
30
30
|
31
31
LL | asm!("{}", sym x);
32
32
| ^ is a local variable
@@ -54,24 +54,6 @@ LL | asm!("{}", in(reg) v[..]);
54
54
= help: the trait `Sized` is not implemented for `[u64]`
55
55
= note: all inline asm arguments must have a statically known size
56
56
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
-
75
57
error: cannot use value of type `[u64]` for inline assembly
76
58
--> $DIR/type-check-1.rs:23:28
77
59
|
@@ -89,21 +71,21 @@ LL | asm!("{}", out(reg) v[..]);
89
71
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
90
72
91
73
error: 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
93
75
|
94
76
LL | asm!("{}", inout(reg) v[..]);
95
77
| ^^^^^
96
78
|
97
79
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
98
80
99
81
error[E0308]: mismatched types
100
- --> $DIR/type-check-1.rs:58 :26
82
+ --> $DIR/type-check-1.rs:56 :26
101
83
|
102
84
LL | asm!("{}", const 0f32);
103
85
| ^^^^ expected integer, found `f32`
104
86
105
87
error[E0308]: mismatched types
106
- --> $DIR/type-check-1.rs:60 :26
88
+ --> $DIR/type-check-1.rs:58 :26
107
89
|
108
90
LL | asm!("{}", const 0 as *mut u8);
109
91
| ^^^^^^^^^^^^ expected integer, found *-ptr
@@ -112,7 +94,7 @@ LL | asm!("{}", const 0 as *mut u8);
112
94
found raw pointer `*mut u8`
113
95
114
96
error[E0308]: mismatched types
115
- --> $DIR/type-check-1.rs:62 :26
97
+ --> $DIR/type-check-1.rs:60 :26
116
98
|
117
99
LL | asm!("{}", const &0);
118
100
| ^^ expected integer, found `&{integer}`
@@ -124,21 +106,21 @@ LL + asm!("{}", const 0);
124
106
|
125
107
126
108
error[E0308]: mismatched types
127
- --> $DIR/type-check-1.rs:76 :25
109
+ --> $DIR/type-check-1.rs:74 :25
128
110
|
129
111
LL | global_asm!("{}", const 0f32);
130
112
| ^^^^ expected integer, found `f32`
131
113
132
114
error[E0308]: mismatched types
133
- --> $DIR/type-check-1.rs:78 :25
115
+ --> $DIR/type-check-1.rs:76 :25
134
116
|
135
117
LL | global_asm!("{}", const 0 as *mut u8);
136
118
| ^^^^^^^^^^^^ expected integer, found *-ptr
137
119
|
138
120
= note: expected type `{integer}`
139
121
found raw pointer `*mut u8`
140
122
141
- error: aborting due to 17 previous errors
123
+ error: aborting due to 15 previous errors
142
124
143
125
Some errors have detailed explanations: E0277, E0308, E0435.
144
126
For more information about an error, try `rustc --explain E0277`.
0 commit comments