diff options
| author | Jack Huey <jack.huey@umassmed.edu> | 2021-05-15 12:10:56 -0400 | 
|---|---|---|
| committer | Jack Huey <jack.huey@umassmed.edu> | 2021-05-15 12:10:56 -0400 | 
| commit | fb6cec440a920c06eebea65c117dbc604899975e (patch) | |
| tree | aad60de6eddcf75d81c25ea137f464ba1990688c /src | |
| parent | 61157b341eab1b555cb5bd099e030817e6d41ba1 (diff) | |
| download | rust-fb6cec440a920c06eebea65c117dbc604899975e.tar.gz rust-fb6cec440a920c06eebea65c117dbc604899975e.zip | |
Revert to only using opportunistic_resolve_vars for existing places
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/ui/associated-types/associated-types-eq-hr.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/associated-types/associated-types-eq-hr.stderr | 35 | ||||
| -rw-r--r-- | src/test/ui/hrtb/issue-62203-hrtb-ice.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/rfc1623.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/rfc1623.stderr | 39 | ||||
| -rw-r--r-- | src/test/ui/traits/inductive-overflow/lifetime.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/traits/inductive-overflow/lifetime.stderr | 6 | ||||
| -rw-r--r-- | src/test/ui/type-alias-impl-trait/issue-60371.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/type-alias-impl-trait/issue-60371.stderr | 7 | 
9 files changed, 14 insertions, 85 deletions
| diff --git a/src/test/ui/associated-types/associated-types-eq-hr.rs b/src/test/ui/associated-types/associated-types-eq-hr.rs index 2cf868f5280..fb391913c32 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.rs +++ b/src/test/ui/associated-types/associated-types-eq-hr.rs @@ -102,8 +102,6 @@ pub fn call_tuple_two() { tuple_two::<Tuple>(); //~^ ERROR implementation of `TheTrait` is not general enough //~| ERROR implementation of `TheTrait` is not general enough - //~| ERROR mismatched types - //~| ERROR mismatched types } pub fn call_tuple_three() { diff --git a/src/test/ui/associated-types/associated-types-eq-hr.stderr b/src/test/ui/associated-types/associated-types-eq-hr.stderr index 281c3cf0fad..6897b31fe46 100644 --- a/src/test/ui/associated-types/associated-types-eq-hr.stderr +++ b/src/test/ui/associated-types/associated-types-eq-hr.stderr @@ -46,34 +46,6 @@ LL | tuple_one::<Tuple>(); = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2` -error[E0308]: mismatched types - --> $DIR/associated-types-eq-hr.rs:102:5 - | -LL | tuple_two::<Tuple>(); - | ^^^^^^^^^^^^^^^^^^ lifetime mismatch - | - = note: expected reference `&'x isize` - found reference `&'y isize` -note: the lifetime requirement is introduced here - --> $DIR/associated-types-eq-hr.rs:66:53 - | -LL | T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>, - | ^^^^^^^^^^^^^ - -error[E0308]: mismatched types - --> $DIR/associated-types-eq-hr.rs:102:5 - | -LL | tuple_two::<Tuple>(); - | ^^^^^^^^^^^^^^^^^^ lifetime mismatch - | - = note: expected reference `&'x isize` - found reference `&'y isize` -note: the lifetime requirement is introduced here - --> $DIR/associated-types-eq-hr.rs:66:53 - | -LL | T: for<'x, 'y> TheTrait<(&'x isize, &'y isize), A = &'y isize>, - | ^^^^^^^^^^^^^ - error: implementation of `TheTrait` is not general enough --> $DIR/associated-types-eq-hr.rs:102:5 | @@ -93,7 +65,7 @@ LL | tuple_two::<Tuple>(); = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2` error: implementation of `TheTrait` is not general enough - --> $DIR/associated-types-eq-hr.rs:114:5 + --> $DIR/associated-types-eq-hr.rs:112:5 | LL | tuple_four::<Tuple>(); | ^^^^^^^^^^^^^^^^^^^ implementation of `TheTrait` is not general enough @@ -101,7 +73,6 @@ LL | tuple_four::<Tuple>(); = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>`, for any two lifetimes `'0` and `'1`... = note: ...but it actually implements `TheTrait<(&'2 isize, &'2 isize)>`, for some specific lifetime `'2` -error: aborting due to 9 previous errors +error: aborting due to 7 previous errors -Some errors have detailed explanations: E0271, E0308. -For more information about an error, try `rustc --explain E0271`. +For more information about this error, try `rustc --explain E0271`. diff --git a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr index 21feada38a8..7b81beeed41 100644 --- a/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr +++ b/src/test/ui/hrtb/issue-62203-hrtb-ice.stderr @@ -9,7 +9,7 @@ LL | let v = Unit2.m( = help: consider constraining the associated type `<_ as Ty<'_>>::V` to `Unit4` = note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html -error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39] as FnOnce<((&'r u8,),)>>::Output == Unit3` +error[E0271]: type mismatch resolving `<[closure@$DIR/issue-62203-hrtb-ice.rs:42:17: 42:39] as FnOnce<((&u8,),)>>::Output == Unit3` --> $DIR/issue-62203-hrtb-ice.rs:38:19 | LL | let v = Unit2.m( diff --git a/src/test/ui/rfc1623.rs b/src/test/ui/rfc1623.rs index b74a141bade..9ff4813d112 100644 --- a/src/test/ui/rfc1623.rs +++ b/src/test/ui/rfc1623.rs @@ -23,10 +23,6 @@ static SOME_STRUCT: &SomeStruct = &SomeStruct { bar: &Bar { bools: &[true, true] }, f: &id, //~^ ERROR implementation of `FnOnce` is not general enough - //~^^ mismatched types - //~^^^ mismatched types - //~^^^^ mismatched types - //~^^^^^ mismatched types }; // very simple test for a 'static static with default lifetime diff --git a/src/test/ui/rfc1623.stderr b/src/test/ui/rfc1623.stderr index 67af4e045bb..e95e68c8e6d 100644 --- a/src/test/ui/rfc1623.stderr +++ b/src/test/ui/rfc1623.stderr @@ -1,39 +1,3 @@ -error[E0308]: mismatched types - --> $DIR/rfc1623.rs:24:8 - | -LL | f: &id, - | ^^^ one type is more general than the other - | - = note: expected reference `&'a Foo<'b>` - found reference `&'a Foo<'b>` - -error[E0308]: mismatched types - --> $DIR/rfc1623.rs:24:8 - | -LL | f: &id, - | ^^^ one type is more general than the other - | - = note: expected reference `&'a Foo<'b>` - found reference `&'a Foo<'b>` - -error[E0308]: mismatched types - --> $DIR/rfc1623.rs:24:8 - | -LL | f: &id, - | ^^^ one type is more general than the other - | - = note: expected reference `&'a Foo<'b>` - found reference `&'a Foo<'b>` - -error[E0308]: mismatched types - --> $DIR/rfc1623.rs:24:8 - | -LL | f: &id, - | ^^^ one type is more general than the other - | - = note: expected reference `&'a Foo<'b>` - found reference `&'a Foo<'b>` - error: implementation of `FnOnce` is not general enough --> $DIR/rfc1623.rs:24:8 | @@ -43,6 +7,5 @@ LL | f: &id, = note: `fn(&'2 Foo<'_>) -> &'2 Foo<'_> {id::<&'2 Foo<'_>>}` must implement `FnOnce<(&'1 Foo<'b>,)>`, for any lifetime `'1`... = note: ...but it actually implements `FnOnce<(&'2 Foo<'_>,)>`, for some specific lifetime `'2` -error: aborting due to 5 previous errors +error: aborting due to previous error -For more information about this error, try `rustc --explain E0308`. diff --git a/src/test/ui/traits/inductive-overflow/lifetime.rs b/src/test/ui/traits/inductive-overflow/lifetime.rs index e23dfa57cd0..b75da1b512d 100644 --- a/src/test/ui/traits/inductive-overflow/lifetime.rs +++ b/src/test/ui/traits/inductive-overflow/lifetime.rs @@ -26,4 +26,6 @@ fn main() { // Should only be a few notes. is_send::<X<C<'static>>>(); //~^ ERROR overflow evaluating + //~| 2 redundant requirements hidden + //~| required because of } diff --git a/src/test/ui/traits/inductive-overflow/lifetime.stderr b/src/test/ui/traits/inductive-overflow/lifetime.stderr index c7397883525..cc913930395 100644 --- a/src/test/ui/traits/inductive-overflow/lifetime.stderr +++ b/src/test/ui/traits/inductive-overflow/lifetime.stderr @@ -1,4 +1,4 @@ -error[E0275]: overflow evaluating the requirement `Box<X<C<'static>>>: NotAuto` +error[E0275]: overflow evaluating the requirement `Box<X<C<'_>>>: NotAuto` --> $DIR/lifetime.rs:27:5 | LL | fn is_send<S: NotAuto>() {} @@ -7,11 +7,13 @@ LL | fn is_send<S: NotAuto>() {} LL | is_send::<X<C<'static>>>(); | ^^^^^^^^^^^^^^^^^^^^^^^^ | -note: required because of the requirements on the impl of `NotAuto` for `X<C<'static>>` +note: required because of the requirements on the impl of `NotAuto` for `X<C<'_>>` --> $DIR/lifetime.rs:19:12 | LL | impl<T: Y> NotAuto for X<T> where T::P: NotAuto {} | ^^^^^^^ ^^^^ + = note: 2 redundant requirements hidden + = note: required because of the requirements on the impl of `NotAuto` for `X<C<'static>>` error: aborting due to previous error diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.rs b/src/test/ui/type-alias-impl-trait/issue-60371.rs index 959b637c850..4ac7f9423ff 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.rs +++ b/src/test/ui/type-alias-impl-trait/issue-60371.rs @@ -9,7 +9,7 @@ trait Bug { impl Bug for &() { type Item = impl Bug; //~ ERROR `impl Trait` in type aliases is unstable //~^ ERROR the trait bound `(): Bug` is not satisfied - //~^^ ERROR the trait bound + //~^^ ERROR could not find defining uses const FUN: fn() -> Self::Item = || (); //~^ ERROR type alias impl trait is not permitted here diff --git a/src/test/ui/type-alias-impl-trait/issue-60371.stderr b/src/test/ui/type-alias-impl-trait/issue-60371.stderr index 6857d5264b6..255d381bf06 100644 --- a/src/test/ui/type-alias-impl-trait/issue-60371.stderr +++ b/src/test/ui/type-alias-impl-trait/issue-60371.stderr @@ -25,14 +25,11 @@ LL | type Item = impl Bug; = help: the following implementations were found: <&() as Bug> -error[E0277]: the trait bound `(): Bug` is not satisfied +error: could not find defining uses --> $DIR/issue-60371.rs:10:17 | LL | type Item = impl Bug; - | ^^^^^^^^ the trait `Bug` is not implemented for `()` - | - = help: the following implementations were found: - <&() as Bug> + | ^^^^^^^^ error: aborting due to 4 previous errors | 
