]> git.lizzy.rs Git - rust.git/blob - src/test/ui/let-else/let-else-no-double-error.rs
Rollup merge of #99479 - Enselic:import-can-be-without-id, r=camelid
[rust.git] / src / test / ui / let-else / let-else-no-double-error.rs
1 // from rfc2005 test suite
2
3 #![feature(let_else)]
4
5 // Without caching type lookups in FnCtxt.resolve_ty_and_def_ufcs
6 // the error below would be reported twice (once when checking
7 // for a non-ref pattern, once when processing the pattern).
8
9 fn main() {
10     let foo = 22;
11     let u32::XXX = foo else { return }; //~ ERROR: no associated item named `XXX` found for type `u32` in the current scope [E0599]
12 }