fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #103046 - JanBeh:PR_clarify_cmp_terminology, r=workingjubilee3bcad65fbf6

master
6.0 KiB202 linesraw
1error: invalid reference to argument at index 0
2  --> $DIR/bad-template.rs:31:15
3   |
4LL |         asm!("{}");
5   |               ^^ from here
6   |
7   = note: no arguments were given
8
9error: invalid reference to argument at index 1
10  --> $DIR/bad-template.rs:33:15
11   |
12LL |         asm!("{1}", in(reg) foo);
13   |               ^^^ from here
14   |
15   = note: there is 1 argument
16
17error: argument never used
18  --> $DIR/bad-template.rs:33:21
19   |
20LL |         asm!("{1}", in(reg) foo);
21   |                     ^^^^^^^^^^^ argument never used
22   |
23   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
24
25error: there is no argument named `a`
26  --> $DIR/bad-template.rs:36:16
27   |
28LL |         asm!("{a}");
29   |                ^
30
31error: invalid reference to argument at index 0
32  --> $DIR/bad-template.rs:38:15
33   |
34LL |         asm!("{}", a = in(reg) foo);
35   |               ^^   --------------- named argument
36   |               |
37   |               from here
38   |
39   = note: no positional arguments were given
40note: named arguments cannot be referenced by position
41  --> $DIR/bad-template.rs:38:20
42   |
43LL |         asm!("{}", a = in(reg) foo);
44   |                    ^^^^^^^^^^^^^^^
45
46error: named argument never used
47  --> $DIR/bad-template.rs:38:20
48   |
49LL |         asm!("{}", a = in(reg) foo);
50   |                    ^^^^^^^^^^^^^^^ named argument never used
51   |
52   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
53
54error: invalid reference to argument at index 1
55  --> $DIR/bad-template.rs:41:15
56   |
57LL |         asm!("{1}", a = in(reg) foo);
58   |               ^^^ from here
59   |
60   = note: no positional arguments were given
61
62error: named argument never used
63  --> $DIR/bad-template.rs:41:21
64   |
65LL |         asm!("{1}", a = in(reg) foo);
66   |                     ^^^^^^^^^^^^^^^ named argument never used
67   |
68   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
69
70error: invalid reference to argument at index 0
71  --> $DIR/bad-template.rs:45:15
72   |
73LL |         asm!("{}", in("eax") foo);
74   |               ^^   ------------- explicit register argument
75   |               |
76   |               from here
77   |
78   = note: no positional arguments were given
79note: explicit register arguments cannot be used in the asm template
80  --> $DIR/bad-template.rs:45:20
81   |
82LL |         asm!("{}", in("eax") foo);
83   |                    ^^^^^^^^^^^^^
84help: use the register name directly in the assembly code
85  --> $DIR/bad-template.rs:45:20
86   |
87LL |         asm!("{}", in("eax") foo);
88   |                    ^^^^^^^^^^^^^
89
90error: asm template modifier must be a single character
91  --> $DIR/bad-template.rs:50:17
92   |
93LL |         asm!("{:foo}", in(reg) foo);
94   |                 ^^^
95
96error: multiple unused asm arguments
97  --> $DIR/bad-template.rs:53:18
98   |
99LL |         asm!("", in(reg) 0, in(reg) 1);
100   |                  ^^^^^^^^^  ^^^^^^^^^ argument never used
101   |                  |
102   |                  argument never used
103   |
104   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
105
106error: invalid reference to argument at index 0
107  --> $DIR/bad-template.rs:59:14
108   |
109LL | global_asm!("{}");
110   |              ^^ from here
111   |
112   = note: no arguments were given
113
114error: invalid reference to argument at index 1
115  --> $DIR/bad-template.rs:61:14
116   |
117LL | global_asm!("{1}", const FOO);
118   |              ^^^ from here
119   |
120   = note: there is 1 argument
121
122error: argument never used
123  --> $DIR/bad-template.rs:61:20
124   |
125LL | global_asm!("{1}", const FOO);
126   |                    ^^^^^^^^^ argument never used
127   |
128   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {0} */"`
129
130error: there is no argument named `a`
131  --> $DIR/bad-template.rs:64:15
132   |
133LL | global_asm!("{a}");
134   |               ^
135
136error: invalid reference to argument at index 0
137  --> $DIR/bad-template.rs:66:14
138   |
139LL | global_asm!("{}", a = const FOO);
140   |              ^^   ------------- named argument
141   |              |
142   |              from here
143   |
144   = note: no positional arguments were given
145note: named arguments cannot be referenced by position
146  --> $DIR/bad-template.rs:66:19
147   |
148LL | global_asm!("{}", a = const FOO);
149   |                   ^^^^^^^^^^^^^
150
151error: named argument never used
152  --> $DIR/bad-template.rs:66:19
153   |
154LL | global_asm!("{}", a = const FOO);
155   |                   ^^^^^^^^^^^^^ named argument never used
156   |
157   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
158
159error: invalid reference to argument at index 1
160  --> $DIR/bad-template.rs:69:14
161   |
162LL | global_asm!("{1}", a = const FOO);
163   |              ^^^ from here
164   |
165   = note: no positional arguments were given
166
167error: named argument never used
168  --> $DIR/bad-template.rs:69:20
169   |
170LL | global_asm!("{1}", a = const FOO);
171   |                    ^^^^^^^^^^^^^ named argument never used
172   |
173   = help: if this argument is intentionally unused, consider using it in an asm comment: `"/* {a} */"`
174
175error: asm template modifier must be a single character
176  --> $DIR/bad-template.rs:72:16
177   |
178LL | global_asm!("{:foo}", const FOO);
179   |                ^^^
180
181error: multiple unused asm arguments
182  --> $DIR/bad-template.rs:74:17
183   |
184LL | global_asm!("", const FOO, const FOO);
185   |                 ^^^^^^^^^  ^^^^^^^^^ argument never used
186   |                 |
187   |                 argument never used
188   |
189   = help: if these arguments are intentionally unused, consider using them in an asm comment: `"/* {0} {1} */"`
190
191warning: formatting may not be suitable for sub-register argument
192  --> $DIR/bad-template.rs:50:15
193   |
194LL |         asm!("{:foo}", in(reg) foo);
195   |               ^^^^^^           --- for this argument
196   |
197   = help: use `{0:e}` to have the register formatted as `eax`
198   = help: or use `{0:r}` to keep the default formatting of `rax`
199   = note: `#[warn(asm_sub_register)]` on by default
200
201error: aborting due to 21 previous errors; 1 warning emitted
202