diff options
| author | varkor <github@varkor.com> | 2020-12-30 15:34:53 +0000 |
|---|---|---|
| committer | kadmin <julianknodt@gmail.com> | 2021-03-23 17:16:20 +0000 |
| commit | 8ef81388e2def7b12d3b527705bf32402c8d7c8a (patch) | |
| tree | c9aa6da68f23fcf67e738005809e476de4887eba /compiler/rustc_passes | |
| parent | e4e5db4e4207e21c38c07640d44005dab022f1b8 (diff) | |
| download | rust-8ef81388e2def7b12d3b527705bf32402c8d7c8a.tar.gz rust-8ef81388e2def7b12d3b527705bf32402c8d7c8a.zip | |
Some refactoring
Diffstat (limited to 'compiler/rustc_passes')
| -rw-r--r-- | compiler/rustc_passes/src/stability.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/compiler/rustc_passes/src/stability.rs b/compiler/rustc_passes/src/stability.rs index dd9cb51c858..8a6ac843534 100644 --- a/compiler/rustc_passes/src/stability.rs +++ b/compiler/rustc_passes/src/stability.rs @@ -507,10 +507,9 @@ impl<'a, 'tcx> Visitor<'tcx> for Annotator<'a, 'tcx> { fn visit_generic_param(&mut self, p: &'tcx hir::GenericParam<'tcx>) { let kind = match &p.kind { - // FIXME(const_generics_defaults) - hir::GenericParamKind::Type { default, .. } if default.is_some() => { - AnnotationKind::Container - } + // Allow stability attributes on default generic arguments. + hir::GenericParamKind::Type { default: Some(_), .. } + | hir::GenericParamKind::Const { default: Some(_), .. } => AnnotationKind::Container, _ => AnnotationKind::Prohibited, }; |
