diff options
| author | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-10-03 15:53:02 +0900 |
|---|---|---|
| committer | Hirochika Matsumoto <git@hkmatsumoto.com> | 2021-10-03 16:16:28 +0900 |
| commit | 3818981ca12ca79dc446fad849d48ebe1257cbc7 (patch) | |
| tree | 35f2bda3785b1c5b5c167c3018e4c2758b8f5eb0 /compiler/rustc_builtin_macros | |
| parent | 77f1e504a953efbbd59673a75c3cd530d5b3c530 (diff) | |
| download | rust-3818981ca12ca79dc446fad849d48ebe1257cbc7.tar.gz rust-3818981ca12ca79dc446fad849d48ebe1257cbc7.zip | |
Practice diagnostic message convention
Diffstat (limited to 'compiler/rustc_builtin_macros')
| -rw-r--r-- | compiler/rustc_builtin_macros/src/concat_idents.rs | 6 | ||||
| -rw-r--r-- | compiler/rustc_builtin_macros/src/test.rs | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_builtin_macros/src/concat_idents.rs b/compiler/rustc_builtin_macros/src/concat_idents.rs index 209158ce392..53a456b69ac 100644 --- a/compiler/rustc_builtin_macros/src/concat_idents.rs +++ b/compiler/rustc_builtin_macros/src/concat_idents.rs @@ -12,7 +12,7 @@ pub fn expand_concat_idents<'cx>( tts: TokenStream, ) -> Box<dyn base::MacResult + 'cx> { if tts.is_empty() { - cx.span_err(sp, "concat_idents! takes 1 or more arguments."); + cx.span_err(sp, "concat_idents! takes 1 or more arguments"); return DummyResult::any(sp); } @@ -22,7 +22,7 @@ pub fn expand_concat_idents<'cx>( match e { TokenTree::Token(Token { kind: token::Comma, .. }) => {} _ => { - cx.span_err(sp, "concat_idents! expecting comma."); + cx.span_err(sp, "concat_idents! expecting comma"); return DummyResult::any(sp); } } @@ -34,7 +34,7 @@ pub fn expand_concat_idents<'cx>( } } - cx.span_err(sp, "concat_idents! requires ident args."); + cx.span_err(sp, "concat_idents! requires ident args"); return DummyResult::any(sp); } } diff --git a/compiler/rustc_builtin_macros/src/test.rs b/compiler/rustc_builtin_macros/src/test.rs index 99544ddb66e..bbca07085ea 100644 --- a/compiler/rustc_builtin_macros/src/test.rs +++ b/compiler/rustc_builtin_macros/src/test.rs @@ -382,7 +382,7 @@ fn should_panic(cx: &ExtCtxt<'_>, i: &ast::Item) -> ShouldPanic { .note( "errors in this attribute were erroneously \ allowed and will become a hard error in a \ - future release.", + future release", ) .emit(); ShouldPanic::Yes(None) |
