diff --git a/compiler/rustc_typeck/src/astconv/mod.rs b/compiler/rustc_typeck/src/astconv/mod.rs index 3c95184c35fe..46b8b2e14c73 100644 --- a/compiler/rustc_typeck/src/astconv/mod.rs +++ b/compiler/rustc_typeck/src/astconv/mod.rs @@ -366,7 +366,13 @@ fn create_substs_for_ast_path<'a>( 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()) {