forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 6
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#133495 - lcnr:env-shadowing-tests, r=compiler-errors add test for alias-bound shadowing, rename folder r? `@BoxyUwU` `@compiler-errors`
- Loading branch information
Showing
10 changed files
with
19 additions
and
0 deletions.
There are no files selected for viewing
19 changes: 19 additions & 0 deletions
19
tests/ui/traits/next-solver/normalization-shadowing/alias-bound-shadowed-by-env.rs
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,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() {} |
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.