diff options
| author | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-02-14 14:10:01 -0500 |
|---|---|---|
| committer | Jack Huey <31162821+jackh726@users.noreply.github.com> | 2022-03-05 13:15:00 -0500 |
| commit | 084c0f36efb44ccce8c523b6fdd9726aa5df6da1 (patch) | |
| tree | 68d3082d6508cf7fbbcdca95771e9a17e380acf4 /src | |
| parent | 2b151fd5c8a106f276477357b5371d1184d940d4 (diff) | |
| download | rust-084c0f36efb44ccce8c523b6fdd9726aa5df6da1.tar.gz rust-084c0f36efb44ccce8c523b6fdd9726aa5df6da1.zip | |
Update new tests
Diffstat (limited to 'src')
4 files changed, 5 insertions, 27 deletions
diff --git a/src/test/ui/generic-associated-types/bugs/issue-87735.rs b/src/test/ui/generic-associated-types/bugs/issue-87735.rs index 6d6063f8085..53e3ad7fe69 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87735.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-87735.rs @@ -12,7 +12,7 @@ pub trait AsRef2 { } impl<T> AsRef2 for Vec<T> { - type Output<'a> where Self: 'a = &'a [T]; + type Output<'a> = &'a [T] where Self: 'a; fn as_ref2<'a>(&'a self) -> Self::Output<'a> { &self[..] @@ -33,7 +33,7 @@ where T: AsRef2<Output<'b> = &'b [U]>, U: 'b { - type Output<'a> where Self: 'a = FooRef<'a, U>; + type Output<'a> = FooRef<'a, U> where Self: 'a; fn as_ref2<'a>(&'a self) -> Self::Output<'a> { FooRef(self.0.as_ref2()) 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 a694f1ffaad..0a18b5f0cbd 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87735.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87735.stderr @@ -1,23 +1,9 @@ -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 - -warning: where clause not allowed here - --> $DIR/issue-87735.rs:36:19 - | -LL | type Output<'a> where Self: 'a = FooRef<'a, U>; - | ^^^^^^^^^^^^^^ - help: move it here: `where Self: 'a` - error[E0207]: the type parameter `U` is not constrained by the impl trait, self type, or predicates --> $DIR/issue-87735.rs:27:13 | LL | impl<'b, T, U> AsRef2 for Foo<T> | ^ unconstrained type parameter -error: aborting due to previous error; 2 warnings emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0207`. diff --git a/src/test/ui/generic-associated-types/bugs/issue-87748.rs b/src/test/ui/generic-associated-types/bugs/issue-87748.rs index ffcfd62cbb3..6e7cd45bdb1 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87748.rs +++ b/src/test/ui/generic-associated-types/bugs/issue-87748.rs @@ -13,7 +13,7 @@ trait MyTrait { struct Foo; impl MyTrait for Foo { - type Assoc<'a, 'b> where 'b: 'a = u32; + type Assoc<'a, 'b> = u32 where 'b: 'a; fn do_sth(_: u32) {} // fn do_sth(_: Self::Assoc<'static, 'static>) {} 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 9a7cdd02eab..60bb48efbc8 100644 --- a/src/test/ui/generic-associated-types/bugs/issue-87748.stderr +++ b/src/test/ui/generic-associated-types/bugs/issue-87748.stderr @@ -1,11 +1,3 @@ -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 | @@ -23,6 +15,6 @@ note: but lifetime parameter must outlive the anonymous lifetime #1 defined here LL | fn do_sth(_: u32) {} | ^^^^^^^^^^^^^^^^^ -error: aborting due to previous error; 1 warning emitted +error: aborting due to previous error For more information about this error, try `rustc --explain E0478`. |
