mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-09 22:37:34 +00:00
Rollup merge of #133495 - lcnr:env-shadowing-tests, r=compiler-errors
add test for alias-bound shadowing, rename folder r? `@BoxyUwU` `@compiler-errors`
This commit is contained in:
commit
0dba9830e8
@ -0,0 +1,19 @@
|
||||
//@ compile-flags: -Znext-solver
|
||||
//@ check-pass
|
||||
|
||||
trait Super {
|
||||
type Assoc;
|
||||
}
|
||||
trait Bound {
|
||||
type Assoc: Super<Assoc = u32>;
|
||||
}
|
||||
trait Trait: Super {}
|
||||
|
||||
// Elaborating the environment results in a `T::Assoc: Super` where-bound.
|
||||
// This where-bound must not prevent normalization via the `Super<Assoc = u32>`
|
||||
// item bound.
|
||||
fn heck<T: Bound<Assoc: Trait>>(x: <T::Assoc as Super>::Assoc) -> u32 {
|
||||
x
|
||||
}
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user