mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-17 22:46:50 +00:00
Use nominal_obligations_without_const
in wf for FnDef
This commit is contained in:
parent
85f4f41deb
commit
b3a328eecf
@ -547,7 +547,7 @@ impl<'tcx> WfPredicates<'tcx> {
|
||||
}
|
||||
|
||||
ty::FnDef(did, substs) => {
|
||||
let obligations = self.nominal_obligations(did, substs);
|
||||
let obligations = self.nominal_obligations_without_const(did, substs);
|
||||
self.out.extend(obligations);
|
||||
}
|
||||
|
||||
|
5
src/test/ui/consts/issue-104155.rs
Normal file
5
src/test/ui/consts/issue-104155.rs
Normal file
@ -0,0 +1,5 @@
|
||||
// check-pass
|
||||
const _: () = core::mem::forget(Box::<u32>::default);
|
||||
const _: () = core::mem::forget(|| Box::<u32>::default());
|
||||
|
||||
fn main() {}
|
Loading…
Reference in New Issue
Block a user