blob: 41ac27508e8ac53e54cd7b69986311461d6f35c4 [file] [log] [blame]
//! Regression test for <https://github.com/rust-lang/rust/issues/146174>.
//! Ensure that we don't ICE when an associated function returns an associated type.
mod m {
pub trait Project {
type Assoc;
}
pub struct Foo {
_priv: (),
}
impl Foo {
fn new<T: Project>() -> T::Assoc {
todo!()
}
}
}
fn main() {
let _ = m::Foo {}; //~ ERROR: cannot construct `Foo`
}