We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a9156e9 commit f5106a2Copy full SHA for f5106a2
src/librustc/ty/instance.rs
@@ -109,7 +109,9 @@ impl<'tcx> InstanceDef<'tcx> {
109
return true
110
}
111
let codegen_fn_attrs = tcx.codegen_fn_attrs(self.def_id());
112
- codegen_fn_attrs.requests_inline() || tcx.is_const_fn(self.def_id())
+ // need to use `is_const_fn_raw` since we don't really care if the user can use it as a
113
+ // const fn, just whether the function should be inlined
114
+ codegen_fn_attrs.requests_inline() || tcx.is_const_fn_raw(self.def_id())
115
116
117
0 commit comments