]> git.lizzy.rs Git - rust.git/blob - src/test/ui/asm/type-check-1.stderr
Merge commit '57b3c4b90f4346b3990c1be387c3b3ca7b78412c' into clippyup
[rust.git] / src / test / ui / asm / type-check-1.stderr
1 error[E0435]: attempt to use a non-constant value in a constant
2   --> $DIR/type-check-1.rs:39:26
3    |
4 LL |         let x = 0;
5    |         ----- help: consider using `const` instead of `let`: `const x`
6 ...
7 LL |         asm!("{}", const x);
8    |                          ^ non-constant value
9
10 error[E0435]: attempt to use a non-constant value in a constant
11   --> $DIR/type-check-1.rs:42:36
12    |
13 LL |         let x = 0;
14    |         ----- help: consider using `const` instead of `let`: `const x`
15 ...
16 LL |         asm!("{}", const const_foo(x));
17    |                                    ^ non-constant value
18
19 error[E0435]: attempt to use a non-constant value in a constant
20   --> $DIR/type-check-1.rs:45:36
21    |
22 LL |         let x = 0;
23    |         ----- help: consider using `const` instead of `let`: `const x`
24 ...
25 LL |         asm!("{}", const const_bar(x));
26    |                                    ^ non-constant value
27
28 error[E0308]: mismatched types
29   --> $DIR/type-check-1.rs:53:26
30    |
31 LL |         asm!("{}", const 0f32);
32    |                          ^^^^ expected integer, found `f32`
33
34 error[E0308]: mismatched types
35   --> $DIR/type-check-1.rs:55:26
36    |
37 LL |         asm!("{}", const 0 as *mut u8);
38    |                          ^^^^^^^^^^^^ expected integer, found *-ptr
39    |
40    = note:     expected type `{integer}`
41            found raw pointer `*mut u8`
42
43 error[E0308]: mismatched types
44   --> $DIR/type-check-1.rs:57:26
45    |
46 LL |         asm!("{}", const &0);
47    |                          ^^ expected integer, found `&{integer}`
48    |
49 help: consider removing the borrow
50    |
51 LL -         asm!("{}", const &0);
52 LL +         asm!("{}", const 0);
53    | 
54
55 error: invalid asm output
56   --> $DIR/type-check-1.rs:15:29
57    |
58 LL |         asm!("{}", out(reg) 1 + 2);
59    |                             ^^^^^ cannot assign to this expression
60
61 error: invalid asm output
62   --> $DIR/type-check-1.rs:17:31
63    |
64 LL |         asm!("{}", inout(reg) 1 + 2);
65    |                               ^^^^^ cannot assign to this expression
66
67 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
68   --> $DIR/type-check-1.rs:23:28
69    |
70 LL |         asm!("{}", in(reg) v[..]);
71    |                            ^^^^^ doesn't have a size known at compile-time
72    |
73    = help: the trait `Sized` is not implemented for `[u64]`
74    = note: all inline asm arguments must have a statically known size
75
76 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
77   --> $DIR/type-check-1.rs:25:29
78    |
79 LL |         asm!("{}", out(reg) v[..]);
80    |                             ^^^^^ doesn't have a size known at compile-time
81    |
82    = help: the trait `Sized` is not implemented for `[u64]`
83    = note: all inline asm arguments must have a statically known size
84
85 error[E0277]: the size for values of type `[u64]` cannot be known at compilation time
86   --> $DIR/type-check-1.rs:27:31
87    |
88 LL |         asm!("{}", inout(reg) v[..]);
89    |                               ^^^^^ doesn't have a size known at compile-time
90    |
91    = help: the trait `Sized` is not implemented for `[u64]`
92    = note: all inline asm arguments must have a statically known size
93
94 error[E0308]: mismatched types
95   --> $DIR/type-check-1.rs:67:25
96    |
97 LL | global_asm!("{}", const 0f32);
98    |                         ^^^^ expected integer, found `f32`
99
100 error[E0308]: mismatched types
101   --> $DIR/type-check-1.rs:69:25
102    |
103 LL | global_asm!("{}", const 0 as *mut u8);
104    |                         ^^^^^^^^^^^^ expected integer, found *-ptr
105    |
106    = note:     expected type `{integer}`
107            found raw pointer `*mut u8`
108
109 error: aborting due to 13 previous errors
110
111 Some errors have detailed explanations: E0277, E0308, E0435.
112 For more information about an error, try `rustc --explain E0277`.