Skip to content

Commit

Permalink
Unrolled build for rust-lang#133495
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#133495 - lcnr:env-shadowing-tests, r=compiler-errors

add test for alias-bound shadowing, rename folder

r? `@BoxyUwU` `@compiler-errors`
  • Loading branch information
rust-timer authored Nov 26, 2024
2 parents f2abf82 + 7dae9ac commit a9c1032
Show file tree
Hide file tree
Showing 10 changed files with 19 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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() {}

0 comments on commit a9c1032

Please sign in to comment.