1 #![allow(non_snake_case)]
3 use syntax::{register_diagnostic, register_long_diagnostics};
5 // Error messages for EXXXX errors.
6 // Each message should start and end with a new line, and be wrapped to 80 characters.
7 // In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable.
8 register_long_diagnostics! {
10 The argument to the `asm` macro is not well-formed.
12 Erroneous code example:
18 Considering that this would be a long explanation, we instead recommend you to
19 take a look at the unstable book:
20 https://doc.rust-lang.org/unstable-book/language-features/asm.html
24 An invalid syntax was passed to the second argument of an `asm` macro line.
26 Erroneous code example:
33 Considering that this would be a long explanation, we instead recommend you to
34 take a look at the unstable book:
35 https://doc.rust-lang.org/unstable-book/language-features/asm.html
39 An invalid input operand constraint was passed to the `asm` macro (third line).
41 Erroneous code example:
50 Considering that this would be a long explanation, we instead recommend you to
51 take a look at the unstable book:
52 https://doc.rust-lang.org/unstable-book/language-features/asm.html
56 An invalid input operand constraint was passed to the `asm` macro (third line).
58 Erroneous code example:
67 Considering that this would be a long explanation, we instead recommend you to
68 take a look at the unstable book:
69 https://doc.rust-lang.org/unstable-book/language-features/asm.html
73 A clobber was surrounded by braces in the `asm` macro.
75 Erroneous code example:
78 asm!("mov $$0x200, %eax"
85 Considering that this would be a long explanation, we instead recommend you to
86 take a look at the unstable book:
87 https://doc.rust-lang.org/unstable-book/language-features/asm.html
91 The `Default` trait was derived on an enum.
93 Erroneous code example:
103 The `Default` cannot be derived on an enum for the simple reason that the
104 compiler doesn't know which value to pick by default whereas it can for a
105 struct as long as all its fields implement the `Default` trait as well.
107 If you still want to implement `Default` on your enum, you'll have to do it "by
116 impl Default for Food {
117 fn default() -> Food {