diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-02-07 01:23:37 -0500 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-03-05 13:15:00 -0500 |
| commit | 3f504f6984331f9465496d9d96c1f43dab5ce9c6 (patch) | |
| tree | 6db5264ddd9a68c3493700ec8bd587ee9967e24f /src | |
| parent | c20b4f558440c24e8ef84782a71163fe236d72de (diff) | |
| download | rust-3f504f6984331f9465496d9d96c1f43dab5ce9c6.tar.gz rust-3f504f6984331f9465496d9d96c1f43dab5ce9c6.zip | |
Change to lint
Diffstat (limited to 'src')
4 files changed, 18 insertions, 12 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-87735.stderr b/src/test/ui/generic-associated-types/bugs/issue-87735.stderr index a64e52124c8..a694f1ffaad 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87735.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87735.stderr @@ -1,10 +1,12 @@ -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/issue-87735.rs:15:19 | LL | type Output<'a> where Self: 'a = &'a [T]; | ^^^^^^^^^^^^^^ - help: move it here: `where Self: 'a` + | + = note: `#[warn(deprecated_where_clause_location)]` on by default -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/issue-87735.rs:36:19 | LL | type Output<'a> where Self: 'a = FooRef<'a, U>; @@ -16,6 +18,6 @@ error[E0207]: the type parameter `U` is not constrained by the impl trait, self LL | impl<'b, T, U> AsRef2 for Foo<T> | ^ unconstrained type parameter -error: aborting due to 3 previous errors +error: aborting due to previous error; 2 warnings emitted For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/generic-associated-types/bugs/issue-87748.stderr b/src/test/ui/generic-associated-types/bugs/issue-87748.stderr index f92930fc948..9a7cdd02eab 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87748.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87748.stderr @@ -1,8 +1,10 @@ -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/issue-87748.rs:16:24 | LL | type Assoc<'a, 'b> where 'b: 'a = u32; | ^^^^^^^^^^^^ - help: move it here: `where 'b: 'a` + | + = note: `#[warn(deprecated_where_clause_location)]` on by default error[E0478]: lifetime bound not satisfied --> $DIR/issue-87748.rs:18:5 @@ -21,6 +23,6 @@ note: but lifetime parameter must outlive the anonymous lifetime #1 defined here LL | fn do_sth(_: u32) {} | ^^^^^^^^^^^^^^^^^ -error: aborting due to 2 previous errors +error: aborting due to previous error; 1 warning emitted For more information about this error, try `rustc --explain E0478`. diff --git a/src/test/ui/parser/type-alias-where.rs b/src/test/ui/parser/type-alias-where.rs index 99ab8a7c48c..941acd5b5ab 100644 --- a/src/test/ui/parser/type-alias-where.rs +++ b/src/test/ui/parser/type-alias-where.rs @@ -20,10 +20,10 @@ trait Trait { impl Trait for u32 { // Not fine, suggests moving. type Assoc where u32: Copy = (); - //~^ ERROR where clause not allowed here + //~^ WARNING where clause not allowed here // Not fine, suggests moving `u32: Copy` type Assoc2 where u32: Copy = () where i32: Copy; - //~^ ERROR where clause not allowed here + //~^ WARNING where clause not allowed here } impl Trait for i32 { @@ -31,7 +31,7 @@ impl Trait for i32 { type Assoc = () where u32: Copy; // Not fine, suggests moving both. type Assoc2 where u32: Copy, i32: Copy = (); - //~^ ERROR where clause not allowed here + //~^ WARNING where clause not allowed here } fn main() {} diff --git a/src/test/ui/parser/type-alias-where.stderr b/src/test/ui/parser/type-alias-where.stderr index 4cc8b703ced..166302c9e1d 100644 --- a/src/test/ui/parser/type-alias-where.stderr +++ b/src/test/ui/parser/type-alias-where.stderr @@ -10,23 +10,25 @@ error: where clauses are not allowed after the type for type aliases LL | type Baz = () where; | ^^^^^ -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/type-alias-where.rs:22:16 | LL | type Assoc where u32: Copy = (); | ^^^^^^^^^^^^^^^ - help: move it here: `where u32: Copy` + | + = note: `#[warn(deprecated_where_clause_location)]` on by default -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/type-alias-where.rs:25:17 | LL | type Assoc2 where u32: Copy = () where i32: Copy; | ^^^^^^^^^^^^^^^ - help: move it here: `, u32: Copy` -error: where clause not allowed here +warning: where clause not allowed here --> $DIR/type-alias-where.rs:33:17 | LL | type Assoc2 where u32: Copy, i32: Copy = (); | ^^^^^^^^^^^^^^^^^^^^^^^^^^ - help: move it here: `where u32: Copy, i32: Copy` -error: aborting due to 5 previous errors +error: aborting due to 2 previous errors; 3 warnings emitted |
