-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rollup merge of #92006 - oli-obk:welcome_opaque_types_into_the_fold, …
…r=nikomatsakis Welcome opaque types into the fold r? ```@nikomatsakis``` because idk who else to bug on the type_op changes The commits have explanations in them. The TLDR is that * 5c46002 stops the "recurse and replace" scheme that replaces opaque types with their canonical inference var by just doing that ahead of time * bdeeb07 does not affect anything on master afaict, but since opaque types generate obligations when instantiated, and lazy TAIT instantiates opaque types *everywhere*, we need to properly handle obligations here instead of just hoping no problematic obligations ever come up.
- Loading branch information
Showing
4 changed files
with
61 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,70 +1,20 @@ | ||
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias | ||
--> $DIR/bound_reduction2.rs:16:60 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ____________________________________________________________^ | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | () | ||
LL | | } | ||
| |_^ | ||
|
||
error: type parameter `T` is part of concrete type but not used in parameter list for the `impl Trait` type alias | ||
--> $DIR/bound_reduction2.rs:16:60 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ____________________________________________________________^ | ||
LL | | | ||
LL | | | ||
LL | | | ||
... | | ||
LL | | () | ||
LL | | } | ||
| |_^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
--> $DIR/bound_reduction2.rs:16:46 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| ^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `<T as TraitWithAssoc>::Assoc` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `_` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: non-defining opaque type use in defining scope | ||
--> $DIR/bound_reduction2.rs:16:1 | ||
| | ||
LL | fn foo_desugared<T: TraitWithAssoc>(_: T) -> Foo<T::Assoc> { | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
note: used non-generic type `_` for generic parameter | ||
--> $DIR/bound_reduction2.rs:9:10 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^ | ||
|
||
error: could not find defining uses | ||
--> $DIR/bound_reduction2.rs:9:15 | ||
| | ||
LL | type Foo<V> = impl Trait<V>; | ||
| ^^^^^^^^^^^^^ | ||
|
||
error: aborting due to 6 previous errors | ||
error: aborting due to 2 previous errors | ||
|