changelog: [min_ident_chars
]: don't lint const generics
This commit is contained in:
parent
43577d58f9
commit
82982133a9
@ -129,6 +129,14 @@ fn visit_id(&mut self, hir_id: HirId) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// `struct Array<T, const N: usize>([T; N])`
|
||||||
|
// ^
|
||||||
|
if let Node::GenericParam(generic_param) = node
|
||||||
|
&& let GenericParamKind::Const { .. } = generic_param.kind
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if is_from_proc_macro(cx, &ident) {
|
if is_from_proc_macro(cx, &ident) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -81,3 +81,7 @@ fn b() {}
|
|||||||
fn wrong_pythagoras(a: f32, b: f32) -> f32 {
|
fn wrong_pythagoras(a: f32, b: f32) -> f32 {
|
||||||
a * a + a * b
|
a * a + a * b
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mod issue_11163 {
|
||||||
|
struct Array<T, const N: usize>([T; N]);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user