Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion tests/error-tests/tests/binop-mul-bool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ fn main() { let x = true * false; }
// ^^^^NOTE(<1.19.0) an implementation of
// ^^^^^^^^^^^^ERR(>=1.19.0,<1.35.0-beta) binary operation
// ^^^^^^^^^^^^NOTE(>=1.19.0,<1.35.0-beta) an implementation of
// ^ERR(>=1.35.0-beta) binary operation
// ^ERR(>=1.35.0-beta,<1.42.0-beta) binary operation
// ^ERR(>=1.42.0-beta) cannot multiply
// ^NOTE(>=1.35.0-beta) an implementation of
// ^^^^ERR(>=1.35.0-beta) bool
// ^^^^^ERR(>=1.35.0-beta) bool
2 changes: 1 addition & 1 deletion tests/error-tests/tests/dead-code-ret.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// error-pattern: unreachable statement

#![deny(unreachable_code)]
// ^^^^^^^^^^^^^^^^NOTE lint level defined here
// ^^^^^^^^^^^^^^^^NOTE defined here
// ^^^^^^^^^^^^^^^^MSG See Primary: ↓:20

fn main() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ fn main() {
1_usize.method();
// ^^^^^^ERR multiple applicable items
// ^^^^^^ERR multiple `method` found
// ^^^^^^HELP(>=1.38.0-beta) to disambiguate
// ^^^^^^HELP(>=1.38.0-beta) to disambiguate
// ^^^^^^HELP(>=1.38.0-beta) disambiguate
// ^^^^^^^^^^^^^^^^HELP(>=1.42.0-beta) /Accept Replacement:.*Foo::method/
// ^^^^^^HELP(>=1.38.0-beta) disambiguate
// ^^^^^^^^^^^^^^^^HELP(>=1.42.0-beta) /Accept Replacement:.*Bar::method/
// ^^^^^^MSG See Also: ↑:13
// ^^^^^^MSG See Also: ↑:18
}
2 changes: 1 addition & 1 deletion tests/error-tests/tests/remote_note_1.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![deny(unreachable_code)]
// ^^^^^^^^^^^^^^^^NOTE lint level defined here
// ^^^^^^^^^^^^^^^^NOTE defined here
// ^^^^^^^^^^^^^^^^MSG See Primary: remote_note_1_mod.rs:4

pub mod remote_note_1_mod;
9 changes: 7 additions & 2 deletions tests/error-tests/tests/test_multiple_primary_spans.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
// (both spans have no label).

#[repr(C, u64)]
// ^WARN conflicting representation hints
// ^^^WARN conflicting representation hints
// ^WARN(<1.42.0-beta) conflicting representation hints
// ^^^WARN(<1.42.0-beta) conflicting representation hints
// ^ERR(>=1.42.0-beta) conflicting representation hints
// ^^^ERR(>=1.42.0-beta) conflicting representation hints
// ^NOTE(>=1.43.0-beta) `#[deny(conflicting_repr_hints)]` on by default
// ^WARN(>=1.43.0-beta) this was previously
// ^NOTE(>=1.43.0-beta) for more information
pub enum C { C }
2 changes: 1 addition & 1 deletion tests/message-order/tests/test_test_output.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ fn slow() {
#[test]
fn panic_outside_crate() {
// This (unfortunately) should not show up as an error when running tests
// since Rust prints the path to src/libcore/result.rs.
// since Rust prints the path to src/libcore/result.rs. (This has been fixed in 1.42.)
Err::<i32, &str>("err").unwrap();
}
5 changes: 3 additions & 2 deletions tests/test_message_order.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
(3, 'tests/test_test_output.rs', 'ERR', (18, 4), 'tests/test_test_output.rs:19:5', 'tests/test_test_output.rs:19:5'),
(4, 'tests/test_test_output.rs', 'ERR', (23, 4), 'tests/test_test_output.rs:24:5', 'tests/test_test_output.rs:24:5'),
(5, 'tests/test_test_output.rs', 'ERR', (28, 4), 'tests/test_test_output.rs:29:5', 'tests/test_test_output.rs:29:5'),
(6, 'tests/test_test_output.rs', 'ERR', (59, 4), 'tests/test_test_output.rs:60:5', 'tests/test_test_output.rs:60:5'),
]
}
]
Expand All @@ -62,8 +63,8 @@ def setUp(self):
super(TestMessageOrder, self).setUp()
# Set a base version for these tests.
version = util.get_rustc_version(sublime.active_window(), plugin_path)
if semver.match(version, '<1.41.0-beta'):
self.skipTest('Tests require rust 1.41 or newer.')
if semver.match(version, '<1.42.0-beta'):
self.skipTest('Tests require rust 1.42 or newer.')

# Make it so that the build target is automatically determined from
# the active view so each test doesn't have to specify it.
Expand Down
3 changes: 2 additions & 1 deletion tests/test_syntax_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def check_actual_text(expected_text, actual_text):
else:
actual_text = msg.text
if check_actual_text(emsg_info['message'], actual_text):
self.assertEqual(emsg_info['level'], msg.level)
self.assertEqual(emsg_info['level'], msg.level,
'Level mismatch. Expected:\n%s\nGot:\n%s' % (emsg_info, msg))
break
else:
raise AssertionError('Did not find expected message "%s:%s" for region %r:%r for file %r\nsetup=%s\nversion=%s\nAvailable messages=%r' % (
Expand Down