about summary refs log tree commit diff
path: root/src/libsyntax_ext/diagnostics.rs
blob: 33ae24c37e53f2791c9bfe51630c3071a1e43816 (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
// Copyright 2018 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#![allow(non_snake_case)]

// Error messages for EXXXX errors.
// Each message should start and end with a new line, and be wrapped to 80 characters.
// In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable.
register_long_diagnostics! {
E0660: r##"
The argument to the `asm` macro is not well-formed.

Erroneous code example:

```compile_fail,E0660
asm!("nop" "nop");
```

Considering that this would be a long explanation, we instead recommend you to
take a look at the unstable book:
https://doc.rust-lang.org/unstable-book/language-features/asm.html
"##,

E0661: r##"
An invalid syntax was passed to the second argument of an `asm` macro line.

Erroneous code example:

```compile_fail,E0661
let a;
asm!("nop" : "r"(a));
```

Considering that this would be a long explanation, we instead recommend you to
take a look at the unstable book:
https://doc.rust-lang.org/unstable-book/language-features/asm.html
"##,

E0662: r##"
An invalid input operand constraint was passed to the `asm` macro (third line).

Erroneous code example:

```compile_fail,E0662
asm!("xor %eax, %eax"
     :
     : "=test"("a")
    );
```

Considering that this would be a long explanation, we instead recommend you to
take a look at the unstable book:
https://doc.rust-lang.org/unstable-book/language-features/asm.html
"##,

E0663: r##"
An invalid input operand constraint was passed to the `asm` macro (third line).

Erroneous code example:

```compile_fail,E0663
asm!("xor %eax, %eax"
     :
     : "+test"("a")
    );
```

Considering that this would be a long explanation, we instead recommend you to
take a look at the unstable book:
https://doc.rust-lang.org/unstable-book/language-features/asm.html
"##,

E0664: r##"
A clobber was surrounded by braces in the `asm` macro.

Erroneous code example:

```compile_fail,E0663
asm!("mov $$0x200, %eax"
     :
     :
     : "{eax}"
    );
```

Considering that this would be a long explanation, we instead recommend you to
take a look at the unstable book:
https://doc.rust-lang.org/unstable-book/language-features/asm.html
"##,
}