Skip to content

Commit

Permalink
Merge pull request #79 from dtolnay/exhaustive
Browse files Browse the repository at this point in the history
Pick up changes to non_exhaustive_omitted_patterns lint
  • Loading branch information
dtolnay authored Jan 4, 2024
2 parents b428d5f + b0ef9bf commit 9237d6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion impl/src/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,7 @@ pub fn expand(input: TokenStream) -> TokenStream {

fn populate_static_lifetimes(ty: &mut Type) {
match ty {
#![cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]
Type::Array(ty) => populate_static_lifetimes(&mut ty.elem),
Type::Group(ty) => populate_static_lifetimes(&mut ty.elem),
Type::Paren(ty) => populate_static_lifetimes(&mut ty.elem),
Expand Down Expand Up @@ -300,7 +301,7 @@ fn populate_static_lifetimes(ty: &mut Type) {
| Type::TraitObject(_)
| Type::BareFn(_)
| Type::Verbatim(_) => {}
#[cfg_attr(all(test, exhaustive), deny(non_exhaustive_omitted_patterns))]

_ => unimplemented!("unknown Type"),
}
}

0 comments on commit 9237d6c

Please sign in to comment.