Support const generics in save analysis
Co-Authored-By: Gabriel Smith <yodaldevoid@users.noreply.github.com>
This commit is contained in:
parent
06abaee21b
commit
3991ba76ee
@ -364,6 +364,7 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> DumpVisitor<'l, 'tcx, 'll, O> {
|
||||
);
|
||||
}
|
||||
}
|
||||
ast::GenericParamKind::Const { .. } => {}
|
||||
}
|
||||
}
|
||||
self.visit_generics(generics);
|
||||
@ -1447,9 +1448,16 @@ impl<'l, 'tcx: 'l, 'll, O: DumpOutput + 'll> Visitor<'l> for DumpVisitor<'l, 'tc
|
||||
|
||||
fn visit_generics(&mut self, generics: &'l ast::Generics) {
|
||||
for param in &generics.params {
|
||||
if let ast::GenericParamKind::Type { ref default, .. } = param.kind {
|
||||
self.process_bounds(¶m.bounds);
|
||||
if let Some(ref ty) = default {
|
||||
match param.kind {
|
||||
ast::GenericParamKind::Lifetime { .. } => {}
|
||||
ast::GenericParamKind::Type { ref default, .. } => {
|
||||
self.process_bounds(¶m.bounds);
|
||||
if let Some(ref ty) = default {
|
||||
self.visit_ty(&ty);
|
||||
}
|
||||
}
|
||||
ast::GenericParamKind::Const { ref ty } => {
|
||||
self.process_bounds(¶m.bounds);
|
||||
self.visit_ty(&ty);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user