Open
Description
rust-analyzer version: 0.3.2045-standalone (4afe0d5 2024-07-21)
rustc version: rustc 1.82.0-nightly (c1a6199e9 2024-07-24)
editor or extension: VSCode, extension v0.3.2045
code snippet to reproduce:
#![feature(impl_trait_in_assoc_type)]
pub trait Traitor {
type Assoc;
const FOO: Self::Assoc;
fn commit(&self, check: Self::Assoc);
}
pub struct Imp {}
struct Concrete {}
impl Traitor for Imp {
type Assoc = impl Sized;
const FOO: Self::Assoc = Concrete {};
fn commit(&self, check: Self::Assoc) {
let Concrete {} = check;
// ^^^^^^^^^^^ non-exhaustive pattern: `_` not covered
}
}
Existing issue #17031 is another false positive of this diagnostic, but it is related to an impl hidden in a const block, rather than an ATPIT.
@rustbot label +A-pattern