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.
is_intrinsic
1 parent 550b276 commit ea92548Copy full SHA for ea92548
clippy_utils/src/qualify_min_const_fn.rs
@@ -334,7 +334,7 @@ fn check_terminator<'tcx>(
334
// within const fns. `transmute` is allowed in all other const contexts.
335
// This won't really scale to more intrinsics or functions. Let's allow const
336
// transmutes in const fn before we add more hacks to this.
337
- if matches!(tcx.intrinsic(fn_def_id), Some(sym::transmute)) {
+ if tcx.is_intrinsic(fn_def_id, sym::transmute) {
338
return Err((
339
span,
340
"can only call `transmute` from const items, not `const fn`".into(),
0 commit comments