]> git.lizzy.rs Git - rust.git/commitdiff
Changing error message to reflect changes with the 2018 edition
authorAdonis <adonis.settouf@gmail.com>
Sat, 2 Feb 2019 11:03:38 +0000 (12:03 +0100)
committerAdonis <adonis.settouf@gmail.com>
Tue, 26 Feb 2019 18:22:29 +0000 (19:22 +0100)
Signed-off-by: Adonis <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Update src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Stabilize split_ascii_whitespace

Tracking issue FCP to merge: https://github.com/rust-lang/rust/issues/48656#issuecomment-442372750

fix stabilization order of uniform_paths.

hir: add HirId to main Hir nodes

Fix `std::os::fortanix_sgx::usercalls::raw::UsercallNrs`

Fixes https://github.com/fortanix/rust-sgx/issues/88

Update src/libsyntax/ext/tt/quoted.rs

Co-Authored-By: asettouf <adonis.settouf@gmail.com>
Revert "Merge remote-tracking branch 'upstream/master'"

This reverts commit 751f05bd155e2c55d4177fe8211df634faf3a644, reversing
changes made to 545a3e62b0cb473108869a61b271bc589afb49da.

src/libsyntax/ext/tt/quoted.rs
src/test/ui/macros/macro-at-most-once-rep-2015-ques-rep.stderr

index b56871a18857fee61821cfa330c032ad13f048cc..43d279980f6ea9eb9666531b32d85c35cefe3a09 100644 (file)
@@ -474,11 +474,13 @@ fn parse_sep_and_kleene_op_2015<I>(
                 // #1 is a separator and #2 should be a KleepeOp.
                 // (N.B. We need to advance the input iterator.)
                 match parse_kleene_op(input, span) {
-                    // #2 is `?`, which is not allowed as a Kleene op in 2015 edition.
+                    // #2 is `?`, which is not allowed as a Kleene op in 2015 edition,
+                    // but is allowed in the 2018 edition.
                     Ok(Ok((op, op2_span))) if op == KleeneOp::ZeroOrOne => {
                         sess.span_diagnostic
                             .struct_span_err(op2_span, "expected `*` or `+`")
-                            .note("`?` is not a macro repetition operator")
+                            .note("`?` is not a macro repetition operator in the 2015 edition, \
+                                 but is accepted in the 2018 edition")
                             .emit();
 
                         // Return a dummy
@@ -506,10 +508,12 @@ fn parse_sep_and_kleene_op_2015<I>(
                     Err(_) => op1_span,
                 }
             } else {
-                // `?` is not allowed as a Kleene op in 2015
+                // `?` is not allowed as a Kleene op in 2015,
+                // but is allowed in the 2018 edition
                 sess.span_diagnostic
                     .struct_span_err(op1_span, "expected `*` or `+`")
-                    .note("`?` is not a macro repetition operator")
+                    .note("`?` is not a macro repetition operator in the 2015 edition, \
+                         but is accepted in the 2018 edition")
                     .emit();
 
                 // Return a dummy
@@ -519,11 +523,13 @@ fn parse_sep_and_kleene_op_2015<I>(
 
         // #1 is a separator followed by #2, a KleeneOp
         Ok(Err((tok, span))) => match parse_kleene_op(input, span) {
-            // #2 is a `?`, which is not allowed as a Kleene op in 2015 edition.
+            // #2 is a `?`, which is not allowed as a Kleene op in 2015 edition,
+            // but is allowed in the 2018 edition
             Ok(Ok((op, op2_span))) if op == KleeneOp::ZeroOrOne => {
                 sess.span_diagnostic
                     .struct_span_err(op2_span, "expected `*` or `+`")
-                    .note("`?` is not a macro repetition operator")
+                    .note("`?` is not a macro repetition operator in the 2015 edition, \
+                        but is accepted in the 2018 edition")
                     .emit();
 
                 // Return a dummy
index b27b60459d63303f70c331a8653c9cb6086d807c..cb0a9163b74702da761767ebcc60f9dbf6012906 100644 (file)
@@ -4,7 +4,7 @@ error: expected `*` or `+`
 LL |     ($(a)?) => {} //~ERROR expected `*` or `+`
    |          ^
    |
-   = note: `?` is not a macro repetition operator
+   = note: `?` is not a macro repetition operator in the 2015 edition, but is accepted in the 2018 edition
 
 error: expected `*` or `+`
   --> $DIR/macro-at-most-once-rep-2015-ques-rep.rs:10:11
@@ -12,7 +12,7 @@ error: expected `*` or `+`
 LL |     ($(a),?) => {} //~ERROR expected `*` or `+`
    |           ^
    |
-   = note: `?` is not a macro repetition operator
+   = note: `?` is not a macro repetition operator in the 2015 edition, but is accepted in the 2018 edition
 
 error: aborting due to 2 previous errors