diff options
| author | Nicolas Koch <nioko1337@gmail.com> | 2018-05-15 15:26:11 +0200 |
|---|---|---|
| committer | Nicolas Koch <nioko1337@gmail.com> | 2018-05-15 15:26:11 +0200 |
| commit | b4b71d5d5fd8bedecbacf08ffb45c8456700151b (patch) | |
| tree | 2ada477250001a23bc2d5329ca572e15b7bf23d7 /src/test/compile-fail | |
| parent | 834ef9f08ae3429a05dead80237bb4bd04769895 (diff) | |
| parent | eca0da59850d4a9eef17c0e6c3795397102d88a3 (diff) | |
| download | rust-b4b71d5d5fd8bedecbacf08ffb45c8456700151b.tar.gz rust-b4b71d5d5fd8bedecbacf08ffb45c8456700151b.zip | |
Merge branch 'master' of https://github.com/nicokoch/rust
Diffstat (limited to 'src/test/compile-fail')
6 files changed, 2 insertions, 33 deletions
diff --git a/src/test/compile-fail/coerce-to-bang.rs b/src/test/compile-fail/coerce-to-bang.rs index 62ff09f4616..8b4e2c3c051 100644 --- a/src/test/compile-fail/coerce-to-bang.rs +++ b/src/test/compile-fail/coerce-to-bang.rs @@ -56,9 +56,8 @@ fn call_foo_f() { } fn array_a() { - // Accepted: return is coerced to `!` just fine, and then `22` can be - // because we already diverged. - let x: [!; 2] = [return, 22]; + // Return is coerced to `!` just fine, but `22` cannot be. + let x: [!; 2] = [return, 22]; //~ ERROR mismatched types } fn array_b() { diff --git a/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs index dcf02f30830..a5df717e06b 100644 --- a/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs +++ b/src/test/compile-fail/derives-span-PartialOrd-enum-struct-variant.rs @@ -17,10 +17,6 @@ struct Error; enum Enum { A { x: Error //~ ERROR -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -//~^^^^ ERROR } } diff --git a/src/test/compile-fail/derives-span-PartialOrd-enum.rs b/src/test/compile-fail/derives-span-PartialOrd-enum.rs index 7eb44c7e19e..3411d2f3119 100644 --- a/src/test/compile-fail/derives-span-PartialOrd-enum.rs +++ b/src/test/compile-fail/derives-span-PartialOrd-enum.rs @@ -17,10 +17,6 @@ struct Error; enum Enum { A( Error //~ ERROR -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -//~^^^^ ERROR ) } diff --git a/src/test/compile-fail/derives-span-PartialOrd-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-struct.rs index 36dae0124ce..1feadc2fd83 100644 --- a/src/test/compile-fail/derives-span-PartialOrd-struct.rs +++ b/src/test/compile-fail/derives-span-PartialOrd-struct.rs @@ -16,10 +16,6 @@ struct Error; #[derive(PartialOrd,PartialEq)] struct Struct { x: Error //~ ERROR -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -//~^^^^ ERROR } fn main() {} diff --git a/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs index fd2df096754..9db0fed2d9e 100644 --- a/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs +++ b/src/test/compile-fail/derives-span-PartialOrd-tuple-struct.rs @@ -16,10 +16,6 @@ struct Error; #[derive(PartialOrd,PartialEq)] struct Struct( Error //~ ERROR -//~^ ERROR -//~^^ ERROR -//~^^^ ERROR -//~^^^^ ERROR ); fn main() {} diff --git a/src/test/compile-fail/range_traits-1.rs b/src/test/compile-fail/range_traits-1.rs index df766e361d5..32f9b83b6e2 100644 --- a/src/test/compile-fail/range_traits-1.rs +++ b/src/test/compile-fail/range_traits-1.rs @@ -15,35 +15,21 @@ struct AllTheRanges { a: Range<usize>, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type b: RangeTo<usize>, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type c: RangeFrom<usize>, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type d: RangeFull, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type e: RangeInclusive<usize>, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type f: RangeToInclusive<usize>, //~^ ERROR PartialOrd //~^^ ERROR Ord - //~^^^ ERROR binary operation `<` cannot be applied to type - //~^^^^ ERROR binary operation `>` cannot be applied to type - //~^^^^^ ERROR binary operation `<=` cannot be applied to type - //~^^^^^^ ERROR binary operation `>=` cannot be applied to type } fn main() {} |
