diff options
| author | Avi Dessauer <avi.the.coder@gmail.com> | 2020-07-08 15:32:11 -0400 |
|---|---|---|
| committer | Jacob Hughes <j@jacobhughes.me> | 2020-09-22 21:55:32 -0400 |
| commit | 9eb595705e754c970de76375060455bc3f576296 (patch) | |
| tree | f3d84af078a81c171c9bf3730649e51486b9a91a | |
| parent | 41eec9065aef513cc41d8e2297c4f469fd7029b7 (diff) | |
| download | rust-9eb595705e754c970de76375060455bc3f576296.tar.gz rust-9eb595705e754c970de76375060455bc3f576296.zip | |
Update src/librustc_typeck/astconv.rs
Co-authored-by: varkor <github@varkor.com>
| -rw-r--r-- | compiler/rustc_typeck/src/astconv/mod.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs index 3c95184c35f..46b8b2e14c7 100644 --- a/compiler/rustc_typeck/src/astconv/mod.rs +++ b/compiler/rustc_typeck/src/astconv/mod.rs @@ -366,7 +366,13 @@ impl<'o, 'tcx> dyn AstConv<'tcx> + 'o { param.def_id, Some(arg.id()), arg.span(), - |_, _| (), + |_, _| { + // Default generic parameters may not be marked + // with stability attributes, i.e. when the + // default parameter was defined at the same time + // as the rest of the type. As such, we ignore missing + // stability attributes. + }, ) } if let (hir::TyKind::Infer, false) = (&ty.kind, self.allow_ty_infer()) { |
