2025-04-16 19:47:56 +00:00
|
|
|
//@ compile-flags: -Znext-solver
|
|
|
|
|
//@ check-pass
|
2025-06-27 05:34:08 +00:00
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
|
#![rustc_no_implicit_bounds]
|
2025-04-16 19:47:56 +00:00
|
|
|
|
|
|
|
|
// Regression test for <https://github.com/rust-lang/trait-system-refactor-initiative/issues/171>.
|
|
|
|
|
// Tests that we don't try to replace `<V as Super>::Output` when replacing projections in the
|
|
|
|
|
// required bounds for `dyn Trait`, b/c `V` is not relevant to the dyn type, which we were
|
|
|
|
|
// previously encountering b/c we were walking into the existential projection bounds of the dyn
|
|
|
|
|
// type itself.
|
|
|
|
|
|
|
|
|
|
pub trait Trait: Super {}
|
|
|
|
|
|
|
|
|
|
pub trait Super {
|
|
|
|
|
type Output;
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-27 05:34:08 +00:00
|
|
|
fn bound<T: Trait>() {}
|
2025-04-16 19:47:56 +00:00
|
|
|
|
2025-06-27 05:34:08 +00:00
|
|
|
fn visit_simd_operator<V: Super>() {
|
2025-04-16 19:47:56 +00:00
|
|
|
bound::<dyn Trait<Output = <V as Super>::Output>>();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|