Skip to content

Commit ea92548

Browse files
committed
Add is_intrinsic helper
1 parent 550b276 commit ea92548

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clippy_utils/src/qualify_min_const_fn.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ fn check_terminator<'tcx>(
334334
// within const fns. `transmute` is allowed in all other const contexts.
335335
// This won't really scale to more intrinsics or functions. Let's allow const
336336
// transmutes in const fn before we add more hacks to this.
337-
if matches!(tcx.intrinsic(fn_def_id), Some(sym::transmute)) {
337+
if tcx.is_intrinsic(fn_def_id, sym::transmute) {
338338
return Err((
339339
span,
340340
"can only call `transmute` from const items, not `const fn`".into(),

0 commit comments

Comments
 (0)