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