// check-pass #![feature(inherent_associated_types)] #![allow(incomplete_features)] // Check that inherent associated types are dispatched on the concrete Self type. struct Select(T); impl Select { type Projection = (); } impl Select { type Projection = bool; } struct Choose(T); struct NonCopy; impl Choose { type Result = Vec; } impl Choose { type Result = (); } fn main() { let _: Select::Projection = false; let _: Select::Projection = (); let _: Choose::Result = (); let _: Choose::Result = vec![true]; } // Test if we use the correct `ParamEnv` when proving obligations. pub fn parameterized(x: T) { let _: Choose::Result = vec![x]; }