forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 1
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 rust-lang#120956 - compiler-errors:clean-type-alias, …
…r=GuillaumeGomez Clean inlined type alias with correct param-env We were cleaning the `hir::Ty` of a type alias item in the param-env of the item that *references* the type alias, and not the alias's own param-env. Fixes rust-lang#120954
- Loading branch information
Showing
2 changed files
with
17 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// check-pass | ||
// compile-flags: -Znormalize-docs | ||
|
||
trait Woo<T> { | ||
type Assoc; | ||
} | ||
|
||
impl<T> Woo<T> for () { | ||
type Assoc = (); | ||
} | ||
|
||
type Alias<P> = <() as Woo<P>>::Assoc; | ||
|
||
pub fn hello<S>() -> Alias<S> {} |