]> git.lizzy.rs Git - rust.git/blob - tests/ui/let-else/let-else-no-double-error.rs
Auto merge of #107843 - bjorn3:sync_cg_clif-2023-02-09, r=bjorn3
[rust.git] / tests / ui / let-else / let-else-no-double-error.rs
1 // from rfc2005 test suite
2
3
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 }