// Regression test for the projection bug in // //@ compile-flags: -Zincremental-verify-ich=yes //@ incremental pub trait A {} pub trait B: A {} pub trait Mirror { type Assoc: ?Sized; } impl Mirror for A { //~^ ERROR the type parameter `T` is not constrained by the impl trait, self type, or predicates [E0207] //~| WARN trait objects without an explicit `dyn` are deprecated [bare_trait_objects] //~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! type Assoc = T; } pub fn foo<'a>( x: &'a ::Assoc ) -> &'a ::Assoc { //~^ ERROR the trait bound `(dyn B + 'static): Mirror` is not satisfied [E0277] //~| ERROR the trait bound `(dyn B + 'static): Mirror` is not satisfied [E0277] static } //~ ERROR expected identifier, found `}` pub fn main() {}