Skip to content

Commit bcdb7b8

Browse files
authored
Merge pull request #420 from ehuss/rust-1.41
Update test for 1.41.
2 parents be113dd + a7ce19d commit bcdb7b8

File tree

12 files changed

+42
-24
lines changed

12 files changed

+42
-24
lines changed

tests/error-tests/examples/no_main.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
//^^^^^^^^^^^^^^^^ERR(>=1.39.0-beta,rust_syntax_checking_include_tests=False) the main function must be defined
66
//^^^^^^^^^^^^^^^^NOTE(>=1.39.0-beta,rust_syntax_checking_include_tests=False) you have one or more functions named `main`
77
//^^^^^^^^^^^^^^^^HELP(>=1.39.0-beta,rust_syntax_checking_include_tests=False) either move the `main`
8-
//^^^^^^^^^^^^^^^^MSG(>=1.39.0-beta,rust_syntax_checking_include_tests=False) See Also: no_main_mod.rs:4
8+
//^^^^^^^^^^^^^^^^MSG(>=1.39.0-beta,rust_syntax_checking_include_tests=False) See Also: no_main_mod.rs:6
99
// When --profile=test is used with `cargo check`, this error will not happen
1010
// due to the synthesized main created by the test harness.
1111
// end-msg: ERR(<1.39.0-beta,rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) /`?main`? function not found/
1212
// end-msg: NOTE(<1.39.0-beta,rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) the main function must be defined
13-
// end-msg: MSG(<1.39.0-beta,rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) See Also: no_main_mod.rs:4
13+
// end-msg: MSG(<1.39.0-beta,rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) See Also: no_main_mod.rs:6
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
/*BEGIN*/fn main() {
2-
// ^^^^^^^^^WARN(>=1.23.0,rust_syntax_checking_include_tests=True) function is never used
3-
// ^^^^^^^^^NOTE(>=1.23.0,rust_syntax_checking_include_tests=True) #[warn(dead_code)]
2+
// ^^^^WARN(>=1.41.0-beta,rust_syntax_checking_include_tests=True) function is never used
3+
// ^^^^NOTE(>=1.41.0-beta,rust_syntax_checking_include_tests=True) #[warn(dead_code)]
4+
// ^^^^^^^^^WARN(>=1.23.0,<1.41.0-beta,rust_syntax_checking_include_tests=True) function is never used
5+
// ^^^^^^^^^NOTE(>=1.23.0,<1.41.0-beta,rust_syntax_checking_include_tests=True) #[warn(dead_code)]
46
}/*END*/
57
// ~NOTE(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) here is a function named
68
// ~MSG(rust_syntax_checking_include_tests=False OR <1.23.0,rust_syntax_checking_include_tests=True) See Primary: no_main.rs

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ mod macro_expansion_inside_mod2;
66
fn f() {
77
let x: () = example_bad_value!();
88
// ^^^^^^^^^^^^^^^^^^^^HELP in this macro invocation
9+
// ^^ERR(>=1.41.0-beta) expected due to this
910
// ^^^^^^^^^^^^^^^^^^^^MSG See Primary: macro_expansion_inside_mod2.rs:3
1011
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ extern crate dcrate;
99
/*BEGIN*/example_bad_syntax!{}/*END*/
1010
// ~ERR(>=1.20.0) /expected one of .*, found `:`/
1111
// ~ERR(>=1.20.0) this error originates in a macro outside of the current crate
12-
// ~ERR(>=1.20.0) /expected one of .* here/
12+
// ~ERR(>=1.20.0,<1.41.0-beta) /expected one of .* here/
13+
// ~ERR(>=1.41.0-beta) /expected one of .* tokens/
1314
// ~ERR(>=1.20.0,<1.24.0-beta) unexpected token
1415
// ~ERR(>=1.20.0,<1.34.0-beta) /expected one of .*, found `:`/
1516
// ~ERR(>=1.20.0,<1.34.0-beta) this error originates in a macro outside of the current crate

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ fn f() {
99
let x: () = example_bad_value!();
1010
// ^^^^^^^^^^^^^^^^^^^^ERR mismatched types
1111
// ^^^^^^^^^^^^^^^^^^^^ERR this error originates in a macro outside
12-
// ^^^^^^^^^^^^^^^^^^^^ERR expected (), found i32
13-
// ^^^^^^^^^^^^^^^^^^^^NOTE expected type
12+
// ^^^^^^^^^^^^^^^^^^^^ERR(>=1.41.0-beta) expected `()`, found `i32`
13+
// ^^^^^^^^^^^^^^^^^^^^ERR(<1.41.0-beta) expected (), found i32
14+
// ^^ERR(>=1.41.0-beta) expected due to this
15+
// ^^^^^^^^^^^^^^^^^^^^NOTE(<1.41.0-beta) expected type
1416
// ^^^^^^^^^^^^^^^^^^^^NOTE(<1.16.0) found type
1517
}

tests/error-tests/tests/macro_expansion_inside_mod1.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ macro_rules! example_bad_syntax {
66
// syntax errors.
77
Kind(x: u32)
88
// ^ERR /expected one of .*, found `:`/
9-
// ^ERR(>=1.18.0) /expected one of .* here/
9+
// ^ERR(>=1.41.0-beta) /expected one of .* tokens/
10+
// ^ERR(>=1.18.0,<1.41.0-beta) /expected one of .* here/
1011
// ^MSG(>=1.20.0) See Also: macro-expansion-inside-1.rs:6
1112
// ^ERR(<1.34.0-beta) /expected one of .*, found `:`/
1213
// ^ERR(>=1.18.0,<1.34.0-beta) expected one of

tests/error-tests/tests/macro_expansion_inside_mod2.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,9 @@
22
macro_rules! example_bad_value {
33
() => (1i32)
44
// ^^^^ERR mismatched types
5-
// ^^^^ERR expected (), found i32
6-
// ^^^^NOTE expected type `()`
5+
// ^^^^ERR(>=1.41.0-beta) expected `()`, found `i32`
6+
// ^^^^ERR(<1.41.0-beta) expected (), found i32
7+
// ^^^^NOTE(<1.41.0-beta) expected type `()`
78
// ^^^^NOTE(<1.16.0) found type `i32`
89
// ^^^^MSG See Also: macro-expansion-inside-2.rs:7
910
}

tests/multi-targets/src/altmain.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ fn main() {
33
}
44

55
/*BEGIN*/fn warning_example() {
6-
// ^^^^^^^^^^^^^^^^^^^^WARN(>=1.22.0) function is never used
7-
// ^^^^^^^^^^^^^^^^^^^^NOTE(>=1.22.0) #[warn(dead_code)]
6+
// ^^^^^^^^^^^^^^^WARN(>=1.41.0-beta) function is never used
7+
// ^^^^^^^^^^^^^^^NOTE(>=1.41.0-beta) #[warn(dead_code)]
8+
// ^^^^^^^^^^^^^^^^^^^^WARN(>=1.22.0,<1.41.0-beta) function is never used
9+
// ^^^^^^^^^^^^^^^^^^^^NOTE(>=1.22.0,<1.41.0-beta) #[warn(dead_code)]
810
}/*END*/
911
// ~WARN(<1.22.0) function is never used
1012
// ~NOTE(<1.22.0,>=1.17.0) #[warn(dead_code)]

tests/multi-targets/src/lib.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ pub fn libf1() {
55
}
66

77
/*BEGIN*/fn unused() {
8-
// ^^^^^^^^^^^WARN(>=1.22.0) function is never used
9-
// ^^^^^^^^^^^NOTE(>=1.22.0) #[warn(dead_code)]
8+
// ^^^^^^WARN(>=1.41.0-beta) function is never used
9+
// ^^^^^^NOTE(>=1.41.0-beta) #[warn(dead_code)]
10+
// ^^^^^^^^^^^WARN(>=1.22.0,<1.41.0-beta) function is never used
11+
// ^^^^^^^^^^^NOTE(>=1.22.0,<1.41.0-beta) #[warn(dead_code)]
1012
}/*END*/
1113
// ~WARN(<1.22.0) function is never used
1214
// ~NOTE(<1.22.0,>=1.17.0) #[warn(dead_code)]

tests/multi-targets/tests/common/helpers.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,17 @@
11
// Example of a module shared among test code.
22

33
/*BEGIN*/pub fn helper() {
4-
// ^^^^^^^^^^^^^^^WARN(>=1.22.0) function is never used
5-
// ^^^^^^^^^^^^^^^NOTE(>=1.22.0) #[warn(dead_code)]
4+
// ^^^^^^WARN(>=1.41.0-beta) function is never used
5+
// ^^^^^^NOTE(>=1.41.0-beta) #[warn(dead_code)]
6+
// ^^^^^^^^^^^^^^^WARN(>=1.22.0,<1.41.0-beta) function is never used
7+
// ^^^^^^^^^^^^^^^NOTE(>=1.22.0,<1.41.0-beta) #[warn(dead_code)]
68
}/*END*/
79
// ~WARN(<1.22.0) function is never used
810
// ~NOTE(<1.22.0,>=1.17.0) #[warn(dead_code)]
911

1012
/*BEGIN*/pub fn unused() {
11-
// ^^^^^^^^^^^^^^^WARN(>=1.22.0) function is never used
13+
// ^^^^^^WARN(>=1.41.0-beta) function is never used
14+
// ^^^^^^^^^^^^^^^WARN(>=1.22.0,<1.41.0-beta) function is never used
1215
// ^^^^^^^^^^^^^^^NOTE(>=1.22.0,<1.24.0-beta) #[warn(dead_code)]
1316
}/*END*/
1417
// ~WARN(<1.22.0) function is never used

0 commit comments

Comments
 (0)