diff options
Diffstat (limited to 'vendor/rustversion/tests')
-rw-r--r-- | vendor/rustversion/tests/compiletest.rs | 1 | ||||
-rw-r--r-- | vendor/rustversion/tests/test_const.rs | 2 | ||||
-rw-r--r-- | vendor/rustversion/tests/test_parse.rs | 13 | ||||
-rw-r--r-- | vendor/rustversion/tests/ui/bad-bound.stderr | 4 | ||||
-rw-r--r-- | vendor/rustversion/tests/ui/bad-date.stderr | 4 | ||||
-rw-r--r-- | vendor/rustversion/tests/ui/bad-not.stderr | 4 | ||||
-rw-r--r-- | vendor/rustversion/tests/ui/bad-version.stderr | 4 | ||||
-rw-r--r-- | vendor/rustversion/tests/ui/const-not-fn.stderr | 2 |
8 files changed, 23 insertions, 11 deletions
diff --git a/vendor/rustversion/tests/compiletest.rs b/vendor/rustversion/tests/compiletest.rs index f9aea23b5..7974a6249 100644 --- a/vendor/rustversion/tests/compiletest.rs +++ b/vendor/rustversion/tests/compiletest.rs @@ -1,4 +1,5 @@ #[rustversion::attr(not(nightly), ignore)] +#[cfg_attr(miri, ignore)] #[test] fn ui() { let t = trybuild::TestCases::new(); diff --git a/vendor/rustversion/tests/test_const.rs b/vendor/rustversion/tests/test_const.rs index 1765c958b..3c4f7d5b6 100644 --- a/vendor/rustversion/tests/test_const.rs +++ b/vendor/rustversion/tests/test_const.rs @@ -1,3 +1,5 @@ +#![allow(clippy::semicolon_if_nothing_returned)] // https://github.com/rust-lang/rust-clippy/issues/7324 + #[rustversion::attr(all(), const)] fn _basic() {} const _BASIC: () = _basic(); diff --git a/vendor/rustversion/tests/test_parse.rs b/vendor/rustversion/tests/test_parse.rs index cb39b3179..95064eece 100644 --- a/vendor/rustversion/tests/test_parse.rs +++ b/vendor/rustversion/tests/test_parse.rs @@ -1,4 +1,8 @@ -#![allow(clippy::enum_glob_use, clippy::must_use_candidate)] +#![allow( + clippy::derive_partial_eq_without_eq, + clippy::enum_glob_use, + clippy::must_use_candidate +)] include!("../build/rustc.rs"); @@ -89,6 +93,11 @@ fn test_parse() { ]; for (string, expected) in cases { - assert_eq!(parse(string).unwrap(), *expected); + match parse(string) { + ParseResult::Success(version) => assert_eq!(version, *expected), + ParseResult::OopsClippy | ParseResult::Unrecognized => { + panic!("unrecognized: {:?}", string); + } + } } } diff --git a/vendor/rustversion/tests/ui/bad-bound.stderr b/vendor/rustversion/tests/ui/bad-bound.stderr index 2c56acbdb..77956c66d 100644 --- a/vendor/rustversion/tests/ui/bad-bound.stderr +++ b/vendor/rustversion/tests/ui/bad-bound.stderr @@ -1,11 +1,11 @@ error: expected rustc release number like 1.31, or nightly date like 2020-02-25 - --> $DIR/bad-bound.rs:1:22 + --> tests/ui/bad-bound.rs:1:22 | 1 | #[rustversion::since(stable)] | ^^^^^^ error: expected rustc release number like 1.31, or nightly date like 2020-02-25 - --> $DIR/bad-bound.rs:4:26 + --> tests/ui/bad-bound.rs:4:26 | 4 | #[rustversion::any(since(stable))] | ^^^^^^ diff --git a/vendor/rustversion/tests/ui/bad-date.stderr b/vendor/rustversion/tests/ui/bad-date.stderr index c523ccc02..378b00e0d 100644 --- a/vendor/rustversion/tests/ui/bad-date.stderr +++ b/vendor/rustversion/tests/ui/bad-date.stderr @@ -1,11 +1,11 @@ error: expected nightly date, like 2020-02-25 - --> $DIR/bad-date.rs:1:24 + --> tests/ui/bad-date.rs:1:24 | 1 | #[rustversion::nightly(stable)] | ^^^^^^ error: expected nightly date, like 2020-02-25 - --> $DIR/bad-date.rs:4:28 + --> tests/ui/bad-date.rs:4:28 | 4 | #[rustversion::any(nightly(stable))] | ^^^^^^ diff --git a/vendor/rustversion/tests/ui/bad-not.stderr b/vendor/rustversion/tests/ui/bad-not.stderr index bfe239b2e..2b0c69933 100644 --- a/vendor/rustversion/tests/ui/bad-not.stderr +++ b/vendor/rustversion/tests/ui/bad-not.stderr @@ -1,11 +1,11 @@ error: expected `(` after `not` - --> $DIR/bad-not.rs:1:20 + --> tests/ui/bad-not.rs:1:20 | 1 | #[rustversion::any(not)] | ^^^ error: expected `(` - --> $DIR/bad-not.rs:4:23 + --> tests/ui/bad-not.rs:4:23 | 4 | #[rustversion::any(not, not)] | ^ diff --git a/vendor/rustversion/tests/ui/bad-version.stderr b/vendor/rustversion/tests/ui/bad-version.stderr index 5f7a01fac..bf3f144b1 100644 --- a/vendor/rustversion/tests/ui/bad-version.stderr +++ b/vendor/rustversion/tests/ui/bad-version.stderr @@ -1,11 +1,11 @@ error: expected rustc release number, like 1.31 - --> $DIR/bad-version.rs:1:23 + --> tests/ui/bad-version.rs:1:23 | 1 | #[rustversion::stable(nightly)] | ^^^^^^^ error: expected rustc release number, like 1.31 - --> $DIR/bad-version.rs:4:27 + --> tests/ui/bad-version.rs:4:27 | 4 | #[rustversion::any(stable(nightly))] | ^^^^^^^ diff --git a/vendor/rustversion/tests/ui/const-not-fn.stderr b/vendor/rustversion/tests/ui/const-not-fn.stderr index 7371ff289..d3cb4aa67 100644 --- a/vendor/rustversion/tests/ui/const-not-fn.stderr +++ b/vendor/rustversion/tests/ui/const-not-fn.stderr @@ -1,5 +1,5 @@ error: only allowed on a fn item - --> $DIR/const-not-fn.rs:1:28 + --> tests/ui/const-not-fn.rs:1:28 | 1 | #[rustversion::attr(all(), const)] | ^^^^^ |