Skip to content

Commit 01e693a

Browse files
bors[bot]ehuss
andcommitted
Merge #374
374: Update tests for recent message format changes. r=ehuss a=ehuss Co-authored-by: Eric Huss <[email protected]>
2 parents 159cffa + 648f12e commit 01e693a

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

tests/error-tests/tests/E0005.rs

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
#![allow(unused)]
1011

1112
fn main() {
1213
let x = Some(1);

tests/error-tests/tests/binop-mul-bool.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,9 @@
1313
fn main() { let x = true * false; }
1414
// ^^^^ERR(<1.19.0) binary operation
1515
// ^^^^NOTE(<1.19.0) an implementation of
16-
// ^^^^^^^^^^^^ERR(>=1.19.0) binary operation
17-
// ^^^^^^^^^^^^NOTE(>=1.19.0) an implementation of
16+
// ^^^^^^^^^^^^ERR(>=1.19.0,<1.35.0-beta) binary operation
17+
// ^^^^^^^^^^^^NOTE(>=1.19.0,<1.35.0-beta) an implementation of
18+
// ^ERR(>=1.35.0-beta) binary operation
19+
// ^NOTE(>=1.35.0-beta) an implementation of
20+
// ^^^^ERR(>=1.35.0-beta) bool
21+
// ^^^^^ERR(>=1.35.0-beta) bool

tests/error-tests/tests/macro-expansion-inside-1.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@ mod macro_expansion_inside_mod1;
55

66
/*BEGIN*/example_bad_syntax!{}/*END*/
77
// ~HELP(>=1.20.0) in this macro invocation
8-
// ~HELP(>=1.20.0) in this macro invocation
9-
// ~MSG(>=1.20.0) See Primary: macro_expansion_inside_mod1.rs:7
8+
// ~HELP(>=1.20.0,<1.34.0-beta) in this macro invocation
109
// ~MSG(>=1.20.0) See Primary: macro_expansion_inside_mod1.rs:7
10+
// ~MSG(>=1.20.0,<1.34.0-beta) See Primary: macro_expansion_inside_mod1.rs:7

tests/error-tests/tests/macro-expansion-outside-1.rs

+15-15
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ extern crate dcrate;
1111
// ~ERR(>=1.20.0) this error originates in a macro outside of the current crate
1212
// ~ERR(>=1.20.0) /expected one of .* here/
1313
// ~ERR(>=1.20.0,<1.24.0-beta) unexpected token
14-
// ~ERR(>=1.20.0) /expected one of .*, found `:`/
15-
// ~ERR(>=1.20.0) this error originates in a macro outside of the current crate
16-
// ~ERR(>=1.20.0) expected one of
17-
// ~ERR(>=1.32.0-beta) in this macro
18-
// ~ERR(>=1.20.0,<1.24.0-beta) unexpected token
19-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
20-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
21-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) Macro text: ( ) => { enum E { Kind ( x : u32 ) } }
22-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .* here/
23-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) unexpected token
24-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) /expected one of .*, found `:`/
25-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) Errors occurred in macro <example_bad_syntax macros> from external crate
26-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) Macro text: ( ) => { enum E { Kind ( x : u32 ) } }
27-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) expected one of 7 possible tokens here
28-
// end-msg: ERR(>=1.19.0,<1.20.0-beta) unexpected token
14+
// ~ERR(>=1.20.0,<1.34.0-beta) /expected one of .*, found `:`/
15+
// ~ERR(>=1.20.0,<1.34.0-beta) this error originates in a macro outside of the current crate
16+
// ~ERR(>=1.20.0,<1.34.0-beta) expected one of
17+
// ~ERR(>=1.32.0,<1.34.0-beta) in this macro
18+
// ~ERR(>=1.20.0,<1.24.0) unexpected token
19+
// end-msg: ERR(>=1.19.0,<1.20.0) /expected one of .*, found `:`/
20+
// end-msg: ERR(>=1.19.0,<1.20.0) Errors occurred in macro <example_bad_syntax macros> from external crate
21+
// end-msg: ERR(>=1.19.0,<1.20.0) Macro text: ( ) => { enum E { Kind ( x : u32 ) } }
22+
// end-msg: ERR(>=1.19.0,<1.20.0) /expected one of .* here/
23+
// end-msg: ERR(>=1.19.0,<1.20.0) unexpected token
24+
// end-msg: ERR(>=1.19.0,<1.20.0) /expected one of .*, found `:`/
25+
// end-msg: ERR(>=1.19.0,<1.20.0) Errors occurred in macro <example_bad_syntax macros> from external crate
26+
// end-msg: ERR(>=1.19.0,<1.20.0) Macro text: ( ) => { enum E { Kind ( x : u32 ) } }
27+
// end-msg: ERR(>=1.19.0,<1.20.0) expected one of 7 possible tokens here
28+
// end-msg: ERR(>=1.19.0,<1.20.0) unexpected token
2929
// end-msg: ERR(<1.19.0) /expected one of .*, found `:`/
3030
// end-msg: ERR(<1.19.0) Errors occurred in macro <example_bad_syntax macros> from external crate
3131
// end-msg: ERR(<1.19.0) Macro text: ( ) => { enum E { Kind ( x : u32 ) } }

tests/error-tests/tests/macro_expansion_inside_mod1.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ macro_rules! example_bad_syntax {
88
// ^ERR /expected one of .*, found `:`/
99
// ^ERR(>=1.18.0) /expected one of .* here/
1010
// ^MSG(>=1.20.0) See Also: macro-expansion-inside-1.rs:6
11-
// ^ERR /expected one of .*, found `:`/
12-
// ^ERR(>=1.18.0) expected one of
13-
// ^MSG(>=1.20.0) See Also: macro-expansion-inside-1.rs:6
11+
// ^ERR(<1.34.0-beta) /expected one of .*, found `:`/
12+
// ^ERR(>=1.18.0,<1.34.0-beta) expected one of
13+
// ^MSG(>=1.20.0,<1.34.0-beta) See Also: macro-expansion-inside-1.rs:6
1414
}
1515
}
1616
}

0 commit comments

Comments
 (0)