Skip to content

Commit 0dba983

Browse files
Rollup merge of #133495 - lcnr:env-shadowing-tests, r=compiler-errors
add test for alias-bound shadowing, rename folder r? `@BoxyUwU` `@compiler-errors`
2 parents 5518c62 + 7dae9ac commit 0dba983

10 files changed

+19
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//@ compile-flags: -Znext-solver
2+
//@ check-pass
3+
4+
trait Super {
5+
type Assoc;
6+
}
7+
trait Bound {
8+
type Assoc: Super<Assoc = u32>;
9+
}
10+
trait Trait: Super {}
11+
12+
// Elaborating the environment results in a `T::Assoc: Super` where-bound.
13+
// This where-bound must not prevent normalization via the `Super<Assoc = u32>`
14+
// item bound.
15+
fn heck<T: Bound<Assoc: Trait>>(x: <T::Assoc as Super>::Assoc) -> u32 {
16+
x
17+
}
18+
19+
fn main() {}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)