summaryrefslogtreecommitdiffstats
path: root/src/test/ui/type-alias-impl-trait/cross_inference_pattern_bug_no_type.rs
blob: 328096d44b4b506161d68defef2d878e87bfb0bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// known-bug: #96572
// compile-flags: --edition=2021 --crate-type=lib
// rustc-env:RUST_BACKTRACE=0

// tracked in https://github.com/rust-lang/rust/issues/96572

#![feature(type_alias_impl_trait)]

fn main() {
    type T = impl Copy;  // error: unconstrained opaque type
    let foo: T = (1u32, 2u32);
    let (a, b) = foo; // removing this line makes the code compile
}