We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 91385d5 + b3a328e commit d22c433Copy full SHA for d22c433
compiler/rustc_trait_selection/src/traits/wf.rs
@@ -547,7 +547,7 @@ impl<'tcx> WfPredicates<'tcx> {
547
}
548
549
ty::FnDef(did, substs) => {
550
- let obligations = self.nominal_obligations(did, substs);
+ let obligations = self.nominal_obligations_without_const(did, substs);
551
self.out.extend(obligations);
552
553
src/test/ui/consts/issue-104155.rs
@@ -0,0 +1,5 @@
1
+// check-pass
2
+const _: () = core::mem::forget(Box::<u32>::default);
3
+const _: () = core::mem::forget(|| Box::<u32>::default());
4
+
5
+fn main() {}
0 commit comments