diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-03-26 22:04:27 +0200 |
|---|---|---|
| committer | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2018-04-14 17:25:35 +0200 |
| commit | 5d52ef5091b8e993477fff36efd4cc6f2df33491 (patch) | |
| tree | ad01daa58e23d1731011348e960bfb8a78bc94a0 /src/libsyntax_ext | |
| parent | 44c686113fe93bb67ac2dcb1db500b5b8cbf0b6a (diff) | |
| download | rust-5d52ef5091b8e993477fff36efd4cc6f2df33491.tar.gz rust-5d52ef5091b8e993477fff36efd4cc6f2df33491.zip | |
Add tests and longer error explanation
Diffstat (limited to 'src/libsyntax_ext')
| -rw-r--r-- | src/libsyntax_ext/diagnostics.rs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/src/libsyntax_ext/diagnostics.rs b/src/libsyntax_ext/diagnostics.rs index e247a22aeb0..a840c0392e9 100644 --- a/src/libsyntax_ext/diagnostics.rs +++ b/src/libsyntax_ext/diagnostics.rs @@ -1,4 +1,4 @@ -// Copyright 2014 The Rust Project Developers. See the COPYRIGHT +// 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. // @@ -15,8 +15,31 @@ // 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 "##, } |
