1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/type-check-1.rs:42:26
|
LL | let x = 0;
| ----- help: consider using `const` instead of `let`: `const x`
...
LL | asm!("{}", const x);
| ^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/type-check-1.rs:45:36
|
LL | let x = 0;
| ----- help: consider using `const` instead of `let`: `const x`
...
LL | asm!("{}", const const_foo(x));
| ^ non-constant value
error[E0435]: attempt to use a non-constant value in a constant
--> $DIR/type-check-1.rs:48:36
|
LL | let x = 0;
| ----- help: consider using `const` instead of `let`: `const x`
...
LL | asm!("{}", const const_bar(x));
| ^ non-constant value
error: invalid `sym` operand
--> $DIR/type-check-1.rs:50:24
|
LL | asm!("{}", sym x);
| ^ is a local variable
|
= help: `sym` operands must refer to either a function or a static
error: invalid asm output
--> $DIR/type-check-1.rs:15:29
|
LL | asm!("{}", out(reg) 1 + 2);
| ^^^^^ cannot assign to this expression
error: invalid asm output
--> $DIR/type-check-1.rs:17:31
|
LL | asm!("{}", inout(reg) 1 + 2);
| ^^^^^ cannot assign to this expression
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> $DIR/type-check-1.rs:23:28
|
LL | asm!("{}", in(reg) v[..]);
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all inline asm arguments must have a statically known size
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> $DIR/type-check-1.rs:26:29
|
LL | asm!("{}", out(reg) v[..]);
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all inline asm arguments must have a statically known size
error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
--> $DIR/type-check-1.rs:29:31
|
LL | asm!("{}", inout(reg) v[..]);
| ^^^^^ doesn't have a size known at compile-time
|
= help: the trait `Sized` is not implemented for `[u64]`
= note: all inline asm arguments must have a statically known size
error: cannot use value of type `[u64]` for inline assembly
--> $DIR/type-check-1.rs:23:28
|
LL | asm!("{}", in(reg) v[..]);
| ^^^^^
|
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `[u64]` for inline assembly
--> $DIR/type-check-1.rs:26:29
|
LL | asm!("{}", out(reg) v[..]);
| ^^^^^
|
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error: cannot use value of type `[u64]` for inline assembly
--> $DIR/type-check-1.rs:29:31
|
LL | asm!("{}", inout(reg) v[..]);
| ^^^^^
|
= note: only integers, floats, SIMD vectors, pointers and function pointers can be used as arguments for inline assembly
error[E0308]: mismatched types
--> $DIR/type-check-1.rs:58:26
|
LL | asm!("{}", const 0f32);
| ^^^^ expected integer, found `f32`
error[E0308]: mismatched types
--> $DIR/type-check-1.rs:60:26
|
LL | asm!("{}", const 0 as *mut u8);
| ^^^^^^^^^^^^ expected integer, found `*mut u8`
|
= note: expected type `{integer}`
found raw pointer `*mut u8`
error[E0308]: mismatched types
--> $DIR/type-check-1.rs:62:26
|
LL | asm!("{}", const &0);
| ^^ expected integer, found `&{integer}`
|
help: consider removing the borrow
|
LL - asm!("{}", const &0);
LL + asm!("{}", const 0);
|
error[E0308]: mismatched types
--> $DIR/type-check-1.rs:76:25
|
LL | global_asm!("{}", const 0f32);
| ^^^^ expected integer, found `f32`
error[E0308]: mismatched types
--> $DIR/type-check-1.rs:78:25
|
LL | global_asm!("{}", const 0 as *mut u8);
| ^^^^^^^^^^^^ expected integer, found `*mut u8`
|
= note: expected type `{integer}`
found raw pointer `*mut u8`
error: aborting due to 17 previous errors
Some errors have detailed explanations: E0277, E0308, E0435.
For more information about an error, try `rustc --explain E0277`.
|