blob: 7b695595483fc6096ba93683181c6d1b8f2197ed [file]
// from rfc2005 test suite
// Without caching type lookups in FnCtxt.resolve_ty_and_def_ufcs
// the error below would be reported twice (once when checking
// for a non-ref pattern, once when processing the pattern).
fn main() {
let foo = 22;
let u32::XXX = foo else { return }; //~ ERROR: no associated function or constant named `XXX` found for type `u32` in the current scope [E0599]
}