1 // Error messages for EXXXX errors.
2 // Each message should start and end with a new line, and be wrapped to 80
3 // characters. In vim you can `:set tw=80` and use `gq` to wrap paragraphs. Use
4 // `:set tw=0` to disable.
5 syntax::register_diagnostics! {
7 The argument to the `asm` macro is not well-formed.
9 Erroneous code example:
15 Considering that this would be a long explanation, we instead recommend you to
16 take a look at the unstable book:
17 https://doc.rust-lang.org/unstable-book/language-features/asm.html
21 An invalid syntax was passed to the second argument of an `asm` macro line.
23 Erroneous code example:
30 Considering that this would be a long explanation, we instead recommend you to
31 take a look at the unstable book:
32 https://doc.rust-lang.org/unstable-book/language-features/asm.html
36 An invalid input operand constraint was passed to the `asm` macro (third line).
38 Erroneous code example:
47 Considering that this would be a long explanation, we instead recommend you to
48 take a look at the unstable book:
49 https://doc.rust-lang.org/unstable-book/language-features/asm.html
53 An invalid input operand constraint was passed to the `asm` macro (third line).
55 Erroneous code example:
64 Considering that this would be a long explanation, we instead recommend you to
65 take a look at the unstable book:
66 https://doc.rust-lang.org/unstable-book/language-features/asm.html
70 A clobber was surrounded by braces in the `asm` macro.
72 Erroneous code example:
75 asm!("mov $$0x200, %eax"
82 Considering that this would be a long explanation, we instead recommend you to
83 take a look at the unstable book:
84 https://doc.rust-lang.org/unstable-book/language-features/asm.html
88 The `Default` trait was derived on an enum.
90 Erroneous code example:
100 The `Default` cannot be derived on an enum for the simple reason that the
101 compiler doesn't know which value to pick by default whereas it can for a
102 struct as long as all its fields implement the `Default` trait as well.
104 If you still want to implement `Default` on your enum, you'll have to do it "by
113 impl Default for Food {
114 fn default() -> Food {