Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 7acf8a9

Browse files
authoredFeb 7, 2020
Merge pull request #424 from ehuss/update-1.42
Update tests for 1.42.
2 parents bcdb7b8 + 180d914 commit 7acf8a9

File tree

8 files changed

+21
-11
lines changed

8 files changed

+21
-11
lines changed
 

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ fn main() { let x = true * false; }
1515
// ^^^^NOTE(<1.19.0) an implementation of
1616
// ^^^^^^^^^^^^ERR(>=1.19.0,<1.35.0-beta) binary operation
1717
// ^^^^^^^^^^^^NOTE(>=1.19.0,<1.35.0-beta) an implementation of
18-
// ^ERR(>=1.35.0-beta) binary operation
18+
// ^ERR(>=1.35.0-beta,<1.42.0-beta) binary operation
19+
// ^ERR(>=1.42.0-beta) cannot multiply
1920
// ^NOTE(>=1.35.0-beta) an implementation of
2021
// ^^^^ERR(>=1.35.0-beta) bool
2122
// ^^^^^ERR(>=1.35.0-beta) bool

‎tests/error-tests/tests/dead-code-ret.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// error-pattern: unreachable statement
1212

1313
#![deny(unreachable_code)]
14-
// ^^^^^^^^^^^^^^^^NOTE lint level defined here
14+
// ^^^^^^^^^^^^^^^^NOTE defined here
1515
// ^^^^^^^^^^^^^^^^MSG See Primary: ↓:20
1616

1717
fn main() {

‎tests/error-tests/tests/method-ambig-two-traits-with-default-method.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ fn main() {
2828
1_usize.method();
2929
// ^^^^^^ERR multiple applicable items
3030
// ^^^^^^ERR multiple `method` found
31-
// ^^^^^^HELP(>=1.38.0-beta) to disambiguate
32-
// ^^^^^^HELP(>=1.38.0-beta) to disambiguate
31+
// ^^^^^^HELP(>=1.38.0-beta) disambiguate
32+
// ^^^^^^^^^^^^^^^^HELP(>=1.42.0-beta) /Accept Replacement:.*Foo::method/
33+
// ^^^^^^HELP(>=1.38.0-beta) disambiguate
34+
// ^^^^^^^^^^^^^^^^HELP(>=1.42.0-beta) /Accept Replacement:.*Bar::method/
3335
// ^^^^^^MSG See Also: ↑:13
3436
// ^^^^^^MSG See Also: ↑:18
3537
}
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#![deny(unreachable_code)]
2-
// ^^^^^^^^^^^^^^^^NOTE lint level defined here
2+
// ^^^^^^^^^^^^^^^^NOTE defined here
33
// ^^^^^^^^^^^^^^^^MSG See Primary: remote_note_1_mod.rs:4
44

55
pub mod remote_note_1_mod;

‎tests/error-tests/tests/test_multiple_primary_spans.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
// (both spans have no label).
33

44
#[repr(C, u64)]
5-
// ^WARN conflicting representation hints
6-
// ^^^WARN conflicting representation hints
5+
// ^WARN(<1.42.0-beta) conflicting representation hints
6+
// ^^^WARN(<1.42.0-beta) conflicting representation hints
7+
// ^ERR(>=1.42.0-beta) conflicting representation hints
8+
// ^^^ERR(>=1.42.0-beta) conflicting representation hints
9+
// ^NOTE(>=1.43.0-beta) `#[deny(conflicting_repr_hints)]` on by default
10+
// ^WARN(>=1.43.0-beta) this was previously
11+
// ^NOTE(>=1.43.0-beta) for more information
712
pub enum C { C }

‎tests/message-order/tests/test_test_output.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ fn slow() {
5656
#[test]
5757
fn panic_outside_crate() {
5858
// This (unfortunately) should not show up as an error when running tests
59-
// since Rust prints the path to src/libcore/result.rs.
59+
// since Rust prints the path to src/libcore/result.rs. (This has been fixed in 1.42.)
6060
Err::<i32, &str>("err").unwrap();
6161
}

‎tests/test_message_order.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
(3, 'tests/test_test_output.rs', 'ERR', (18, 4), 'tests/test_test_output.rs:19:5', 'tests/test_test_output.rs:19:5'),
5252
(4, 'tests/test_test_output.rs', 'ERR', (23, 4), 'tests/test_test_output.rs:24:5', 'tests/test_test_output.rs:24:5'),
5353
(5, 'tests/test_test_output.rs', 'ERR', (28, 4), 'tests/test_test_output.rs:29:5', 'tests/test_test_output.rs:29:5'),
54+
(6, 'tests/test_test_output.rs', 'ERR', (59, 4), 'tests/test_test_output.rs:60:5', 'tests/test_test_output.rs:60:5'),
5455
]
5556
}
5657
]
@@ -62,8 +63,8 @@ def setUp(self):
6263
super(TestMessageOrder, self).setUp()
6364
# Set a base version for these tests.
6465
version = util.get_rustc_version(sublime.active_window(), plugin_path)
65-
if semver.match(version, '<1.41.0-beta'):
66-
self.skipTest('Tests require rust 1.41 or newer.')
66+
if semver.match(version, '<1.42.0-beta'):
67+
self.skipTest('Tests require rust 1.42 or newer.')
6768

6869
# Make it so that the build target is automatically determined from
6970
# the active view so each test doesn't have to specify it.

‎tests/test_syntax_check.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,8 @@ def check_actual_text(expected_text, actual_text):
232232
else:
233233
actual_text = msg.text
234234
if check_actual_text(emsg_info['message'], actual_text):
235-
self.assertEqual(emsg_info['level'], msg.level)
235+
self.assertEqual(emsg_info['level'], msg.level,
236+
'Level mismatch. Expected:\n%s\nGot:\n%s' % (emsg_info, msg))
236237
break
237238
else:
238239
raise AssertionError('Did not find expected message "%s:%s" for region %r:%r for file %r\nsetup=%s\nversion=%s\nAvailable messages=%r' % (

0 commit comments

Comments
 (0)
Please sign in to comment.