summaryrefslogtreecommitdiffstats
path: root/tests/ui/asm/bad-template.x86_64_mirunsafeck.stderr
blob: 41ac37c33c2e057676ec24a44404480504e84d5b (plain)
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
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
error: invalid reference to argument at index 0
  --> $DIR/bad-template.rs:31:15
   |
LL |         asm!("{}");
   |               ^^ from here
   |
   = note: no arguments were given

error: invalid reference to argument at index 1
  --> $DIR/bad-template.rs:33:15
   |
LL |         asm!("{1}", in(reg) foo);
   |               ^^^ from here
   |
   = note: there is 1 argument

error: argument never used
  --> $DIR/bad-template.rs:33:21
   |
LL |         asm!("{1}", in(reg) foo);
   |                     ^^^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`

error: there is no argument named `a`
  --> $DIR/bad-template.rs:36:16
   |
LL |         asm!("{a}");
   |                ^

error: invalid reference to argument at index 0
  --> $DIR/bad-template.rs:38:15
   |
LL |         asm!("{}", a = in(reg) foo);
   |               ^^   --------------- named argument
   |               |
   |               from here
   |
   = note: no positional arguments were given
note: named arguments cannot be referenced by position
  --> $DIR/bad-template.rs:38:20
   |
LL |         asm!("{}", a = in(reg) foo);
   |                    ^^^^^^^^^^^^^^^

error: named argument never used
  --> $DIR/bad-template.rs:38:20
   |
LL |         asm!("{}", a = in(reg) foo);
   |                    ^^^^^^^^^^^^^^^ named argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`

error: invalid reference to argument at index 1
  --> $DIR/bad-template.rs:41:15
   |
LL |         asm!("{1}", a = in(reg) foo);
   |               ^^^ from here
   |
   = note: no positional arguments were given

error: named argument never used
  --> $DIR/bad-template.rs:41:21
   |
LL |         asm!("{1}", a = in(reg) foo);
   |                     ^^^^^^^^^^^^^^^ named argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`

error: invalid reference to argument at index 0
  --> $DIR/bad-template.rs:45:15
   |
LL |         asm!("{}", in("eax") foo);
   |               ^^   ------------- explicit register argument
   |               |
   |               from here
   |
   = note: no positional arguments were given
note: explicit register arguments cannot be used in the asm template
  --> $DIR/bad-template.rs:45:20
   |
LL |         asm!("{}", in("eax") foo);
   |                    ^^^^^^^^^^^^^
help: use the register name directly in the assembly code
  --> $DIR/bad-template.rs:45:20
   |
LL |         asm!("{}", in("eax") foo);
   |                    ^^^^^^^^^^^^^

error: asm template modifier must be a single character
  --> $DIR/bad-template.rs:50:17
   |
LL |         asm!("{:foo}", in(reg) foo);
   |                 ^^^

error: multiple unused asm arguments
  --> $DIR/bad-template.rs:53:18
   |
LL |         asm!("", in(reg) 0, in(reg) 1);
   |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
   |                  |
   |                  argument never used
   |
   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`

error: invalid reference to argument at index 0
  --> $DIR/bad-template.rs:59:14
   |
LL | global_asm!("{}");
   |              ^^ from here
   |
   = note: no arguments were given

error: invalid reference to argument at index 1
  --> $DIR/bad-template.rs:61:14
   |
LL | global_asm!("{1}", const FOO);
   |              ^^^ from here
   |
   = note: there is 1 argument

error: argument never used
  --> $DIR/bad-template.rs:61:20
   |
LL | global_asm!("{1}", const FOO);
   |                    ^^^^^^^^^ argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`

error: there is no argument named `a`
  --> $DIR/bad-template.rs:64:15
   |
LL | global_asm!("{a}");
   |               ^

error: invalid reference to argument at index 0
  --> $DIR/bad-template.rs:66:14
   |
LL | global_asm!("{}", a = const FOO);
   |              ^^   ------------- named argument
   |              |
   |              from here
   |
   = note: no positional arguments were given
note: named arguments cannot be referenced by position
  --> $DIR/bad-template.rs:66:19
   |
LL | global_asm!("{}", a = const FOO);
   |                   ^^^^^^^^^^^^^

error: named argument never used
  --> $DIR/bad-template.rs:66:19
   |
LL | global_asm!("{}", a = const FOO);
   |                   ^^^^^^^^^^^^^ named argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`

error: invalid reference to argument at index 1
  --> $DIR/bad-template.rs:69:14
   |
LL | global_asm!("{1}", a = const FOO);
   |              ^^^ from here
   |
   = note: no positional arguments were given

error: named argument never used
  --> $DIR/bad-template.rs:69:20
   |
LL | global_asm!("{1}", a = const FOO);
   |                    ^^^^^^^^^^^^^ named argument never used
   |
   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`

error: asm template modifier must be a single character
  --> $DIR/bad-template.rs:72:16
   |
LL | global_asm!("{:foo}", const FOO);
   |                ^^^

error: multiple unused asm arguments
  --> $DIR/bad-template.rs:74:17
   |
LL | global_asm!("", const FOO, const FOO);
   |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
   |                 |
   |                 argument never used
   |
   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`

warning: formatting may not be suitable for sub-register argument
  --> $DIR/bad-template.rs:50:15
   |
LL |         asm!("{:foo}", in(reg) foo);
   |               ^^^^^^           --- for this argument
   |
   = help: use `{0:e}` to have the register formatted as `eax`
   = help: or use `{0:r}` to keep the default formatting of `rax`
   = note: `#[warn(asm_sub_register)]` on by default

error: aborting due to 21 previous errors; 1 warning emitted