diff options
Diffstat (limited to 'tests/ui/parser')
| -rw-r--r-- | tests/ui/parser/type-alias-where-fixable.fixed | 28 | ||||
| -rw-r--r-- | tests/ui/parser/type-alias-where-fixable.rs | 28 | ||||
| -rw-r--r-- | tests/ui/parser/type-alias-where-fixable.stderr | 42 | ||||
| -rw-r--r-- | tests/ui/parser/type-alias-where.rs | 11 | ||||
| -rw-r--r-- | tests/ui/parser/type-alias-where.stderr | 18 |
5 files changed, 0 insertions, 127 deletions
diff --git a/tests/ui/parser/type-alias-where-fixable.fixed b/tests/ui/parser/type-alias-where-fixable.fixed deleted file mode 100644 index 2f47c0d91fa..00000000000 --- a/tests/ui/parser/type-alias-where-fixable.fixed +++ /dev/null @@ -1,28 +0,0 @@ -// check-pass -// run-rustfix - -trait Trait { - // Fine. - type Assoc where u32: Copy; - // Fine. - type Assoc2 where u32: Copy, i32: Copy; -} - -impl Trait for u32 { - // Not fine, suggests moving. - type Assoc = () where u32: Copy; - //~^ WARNING where clause not allowed here - // Not fine, suggests moving `u32: Copy` - type Assoc2 = () where i32: Copy, u32: Copy; - //~^ WARNING where clause not allowed here -} - -impl Trait for i32 { - // Fine. - type Assoc = () where u32: Copy; - // Not fine, suggests moving both. - type Assoc2 = () where u32: Copy, i32: Copy; - //~^ WARNING where clause not allowed here -} - -fn main() {} diff --git a/tests/ui/parser/type-alias-where-fixable.rs b/tests/ui/parser/type-alias-where-fixable.rs deleted file mode 100644 index b20aa9398b5..00000000000 --- a/tests/ui/parser/type-alias-where-fixable.rs +++ /dev/null @@ -1,28 +0,0 @@ -// check-pass -// run-rustfix - -trait Trait { - // Fine. - type Assoc where u32: Copy; - // Fine. - type Assoc2 where u32: Copy, i32: Copy; -} - -impl Trait for u32 { - // Not fine, suggests moving. - type Assoc where u32: Copy = (); - //~^ WARNING where clause not allowed here - // Not fine, suggests moving `u32: Copy` - type Assoc2 where u32: Copy = () where i32: Copy; - //~^ WARNING where clause not allowed here -} - -impl Trait for i32 { - // Fine. - type Assoc = () where u32: Copy; - // Not fine, suggests moving both. - type Assoc2 where u32: Copy, i32: Copy = (); - //~^ WARNING where clause not allowed here -} - -fn main() {} diff --git a/tests/ui/parser/type-alias-where-fixable.stderr b/tests/ui/parser/type-alias-where-fixable.stderr deleted file mode 100644 index f0acb388b97..00000000000 --- a/tests/ui/parser/type-alias-where-fixable.stderr +++ /dev/null @@ -1,42 +0,0 @@ -warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:13:16 - | -LL | type Assoc where u32: Copy = (); - | ^^^^^^^^^^^^^^^ - | - = note: see issue #89122 <https://github.com/rust-lang/rust/issues/89122> for more information - = note: `#[warn(deprecated_where_clause_location)]` on by default -help: move it to the end of the type declaration - | -LL - type Assoc where u32: Copy = (); -LL + type Assoc = () where u32: Copy; - | - -warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:16:17 - | -LL | type Assoc2 where u32: Copy = () where i32: Copy; - | ^^^^^^^^^^^^^^^ - | - = note: see issue #89122 <https://github.com/rust-lang/rust/issues/89122> for more information -help: move it to the end of the type declaration - | -LL - type Assoc2 where u32: Copy = () where i32: Copy; -LL + type Assoc2 = () where i32: Copy, u32: Copy; - | - -warning: where clause not allowed here - --> $DIR/type-alias-where-fixable.rs:24:17 - | -LL | type Assoc2 where u32: Copy, i32: Copy = (); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: see issue #89122 <https://github.com/rust-lang/rust/issues/89122> for more information -help: move it to the end of the type declaration - | -LL - type Assoc2 where u32: Copy, i32: Copy = (); -LL + type Assoc2 = () where u32: Copy, i32: Copy; - | - -warning: 3 warnings emitted - diff --git a/tests/ui/parser/type-alias-where.rs b/tests/ui/parser/type-alias-where.rs deleted file mode 100644 index 62e301cb408..00000000000 --- a/tests/ui/parser/type-alias-where.rs +++ /dev/null @@ -1,11 +0,0 @@ -// check-fail - -// Fine, but lints as unused -type Foo where u32: Copy = (); -// Not fine. -type Bar = () where u32: Copy; -//~^ ERROR where clauses are not allowed -type Baz = () where; -//~^ ERROR where clauses are not allowed - -fn main() {} diff --git a/tests/ui/parser/type-alias-where.stderr b/tests/ui/parser/type-alias-where.stderr deleted file mode 100644 index fb838179266..00000000000 --- a/tests/ui/parser/type-alias-where.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: where clauses are not allowed after the type for type aliases - --> $DIR/type-alias-where.rs:6:15 - | -LL | type Bar = () where u32: Copy; - | ^^^^^^^^^^^^^^^ - | - = note: see issue #89122 <https://github.com/rust-lang/rust/issues/89122> for more information - -error: where clauses are not allowed after the type for type aliases - --> $DIR/type-alias-where.rs:8:15 - | -LL | type Baz = () where; - | ^^^^^ - | - = note: see issue #89122 <https://github.com/rust-lang/rust/issues/89122> for more information - -error: aborting due to 2 previous errors - |
