We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 91d1ed2 commit af9009fCopy full SHA for af9009f
compiler/rustc_hir_analysis/src/hir_ty_lowering/bounds.rs
@@ -339,6 +339,12 @@ impl<'tcx> dyn HirTyLowerer<'tcx> + '_ {
339
let tcx = self.tcx();
340
341
if tcx.is_lang_item(def_id, hir::LangItem::Sized) || tcx.is_default_trait(def_id) {
342
+ // FIXME(fmease): Debug-assert that the trait doesn't have any generic parameters
343
+ // (except `Self`) or associated items since we wouldn't be able to
344
+ // wfcheck args & constraints passed to it.
345
+ // E.g., `?BadDefaultTrait<Vec<str>`.
346
+ // NOTE: Alternatively / additionally, introduce a validation step for
347
+ // traits marked `#[default_trait]` in AST validation / lowering.
348
return;
349
}
350
0 commit comments