generic_extension: defatalize Error case
This commit is contained in:
parent
b7909b22b5
commit
b0537e2081
5 changed files with 32 additions and 9 deletions
|
|
@ -1,4 +1,11 @@
|
|||
macro_rules! test { ($a, $b) => (()); } //~ ERROR missing fragment
|
||||
macro_rules! test {
|
||||
($a, $b) => {
|
||||
//~^ ERROR missing fragment
|
||||
//~| ERROR missing fragment
|
||||
//~| WARN this was previously accepted
|
||||
()
|
||||
};
|
||||
}
|
||||
|
||||
fn main() {
|
||||
test!()
|
||||
|
|
|
|||
|
|
@ -1,8 +1,18 @@
|
|||
error: missing fragment specifier
|
||||
--> $DIR/macro-match-nonterminal.rs:1:24
|
||||
--> $DIR/macro-match-nonterminal.rs:2:8
|
||||
|
|
||||
LL | macro_rules! test { ($a, $b) => (()); }
|
||||
| ^
|
||||
LL | ($a, $b) => {
|
||||
| ^
|
||||
|
||||
error: aborting due to previous error
|
||||
error: missing fragment specifier
|
||||
--> $DIR/macro-match-nonterminal.rs:2:10
|
||||
|
|
||||
LL | ($a, $b) => {
|
||||
| ^^
|
||||
|
|
||||
= note: `#[deny(missing_fragment_specifier)]` on by default
|
||||
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
|
||||
= note: for more information, see issue #40107 <https://github.com/rust-lang/rust/issues/40107>
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,5 @@
|
|||
fn main() {}
|
||||
|
||||
macro_rules! foo {
|
||||
{ $+ } => { //~ ERROR expected identifier, found `+`
|
||||
//~^ ERROR missing fragment specifier
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
error: expected identifier, found `+`
|
||||
--> $DIR/issue-33569.rs:2:8
|
||||
--> $DIR/issue-33569.rs:4:8
|
||||
|
|
||||
LL | { $+ } => {
|
||||
| ^
|
||||
|
||||
error: expected one of: `*`, `+`, or `?`
|
||||
--> $DIR/issue-33569.rs:4:13
|
||||
--> $DIR/issue-33569.rs:6:13
|
||||
|
|
||||
LL | $(x)(y)
|
||||
| ^^^
|
||||
|
||||
error: missing fragment specifier
|
||||
--> $DIR/issue-33569.rs:2:8
|
||||
--> $DIR/issue-33569.rs:4:8
|
||||
|
|
||||
LL | { $+ } => {
|
||||
| ^
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue