1 use syntax::register_long_diagnostics;
3 // Error messages for EXXXX errors.
4 // Each message should start and end with a new line, and be wrapped to 80 characters.
5 // In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use `:set tw=0` to disable.
6 register_long_diagnostics! {
8 The argument to the `asm` macro is not well-formed.
10 Erroneous code example:
16 Considering that this would be a long explanation, we instead recommend you to
17 take a look at the unstable book:
18 https://doc.rust-lang.org/unstable-book/language-features/asm.html
22 An invalid syntax was passed to the second argument of an `asm` macro line.
24 Erroneous code example:
31 Considering that this would be a long explanation, we instead recommend you to
32 take a look at the unstable book:
33 https://doc.rust-lang.org/unstable-book/language-features/asm.html
37 An invalid input operand constraint was passed to the `asm` macro (third line).
39 Erroneous code example:
48 Considering that this would be a long explanation, we instead recommend you to
49 take a look at the unstable book:
50 https://doc.rust-lang.org/unstable-book/language-features/asm.html
54 An invalid input operand constraint was passed to the `asm` macro (third line).
56 Erroneous code example:
65 Considering that this would be a long explanation, we instead recommend you to
66 take a look at the unstable book:
67 https://doc.rust-lang.org/unstable-book/language-features/asm.html
71 A clobber was surrounded by braces in the `asm` macro.
73 Erroneous code example:
76 asm!("mov $$0x200, %eax"
83 Considering that this would be a long explanation, we instead recommend you to
84 take a look at the unstable book:
85 https://doc.rust-lang.org/unstable-book/language-features/asm.html
89 The `Default` trait was derived on an enum.
91 Erroneous code example:
101 The `Default` cannot be derived on an enum for the simple reason that the
102 compiler doesn't know which value to pick by default whereas it can for a
103 struct as long as all its fields implement the `Default` trait as well.
105 If you still want to implement `Default` on your enum, you'll have to do it "by
114 impl Default for Food {
115 fn default() -> Food {