1
Fork 0

Switch from using //~ERROR annotations with --error-format to error-pattern

Resolves Issue #118752
This commit is contained in:
Rajveer 2023-12-21 15:14:43 +05:30
parent be69926a73
commit af44e719fa
22 changed files with 1006 additions and 993 deletions

View file

@ -1,5 +1,6 @@
// compile-flags: --error-format human-annotate-rs -Z unstable-options
// error-pattern:cannot find type `Iter` in this scope
pub fn main() {
let x: Iter; //~ ERROR cannot find type `Iter` in this scope
let x: Iter;
}

View file

@ -1,5 +1,5 @@
error[E0412]: cannot find type `Iter` in this scope
--> $DIR/missing-type.rs:4:12
--> $DIR/missing-type.rs:5:12
|
LL | let x: Iter;
| ^^^^ not found in this scope

View file

@ -1,4 +1,5 @@
// aux-build:multispan.rs
// error-pattern:hello to you, too!
// compile-flags: --error-format human-annotate-rs -Z unstable-options
#![feature(proc_macro_hygiene)]
@ -12,17 +13,17 @@ fn main() {
hello!();
// Exactly one 'hi'.
hello!(hi); //~ ERROR hello to you, too!
hello!(hi);
// Now two, back to back.
hello!(hi hi); //~ ERROR hello to you, too!
hello!(hi hi);
// Now three, back to back.
hello!(hi hi hi); //~ ERROR hello to you, too!
hello!(hi hi hi);
// Now several, with spacing.
hello!(hi hey hi yo hi beep beep hi hi); //~ ERROR hello to you, too!
hello!(hi there, hi how are you? hi... hi.); //~ ERROR hello to you, too!
hello!(whoah. hi di hi di ho); //~ ERROR hello to you, too!
hello!(hi good hi and good bye); //~ ERROR hello to you, too!
hello!(hi hey hi yo hi beep beep hi hi);
hello!(hi there, hi how are you? hi... hi.);
hello!(whoah. hi di hi di ho);
hello!(hi good hi and good bye);
}

View file

@ -1,41 +1,41 @@
error: hello to you, too!
--> $DIR/multispan.rs:15:5
--> $DIR/multispan.rs:16:5
|
LL | hello!(hi);
| ^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:18:5
--> $DIR/multispan.rs:19:5
|
LL | hello!(hi hi);
| ^^^^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:21:5
--> $DIR/multispan.rs:22:5
|
LL | hello!(hi hi hi);
| ^^^^^^^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:24:5
--> $DIR/multispan.rs:25:5
|
LL | hello!(hi hey hi yo hi beep beep hi hi);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:25:5
--> $DIR/multispan.rs:26:5
|
LL | hello!(hi there, hi how are you? hi... hi.);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:26:5
--> $DIR/multispan.rs:27:5
|
LL | hello!(whoah. hi di hi di ho);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
error: hello to you, too!
--> $DIR/multispan.rs:27:5
--> $DIR/multispan.rs:28:5
|
LL | hello!(hi good hi and good bye);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^