diff options
| author | Michael Goulet <michael@errs.io> | 2024-05-09 22:45:14 -0400 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2024-05-09 22:55:00 -0400 |
| commit | 51145a20bfec060b3a5015d922125e886af91d39 (patch) | |
| tree | d196963d1d001d7c5f53981da6de7bcc33e2ad8b /clippy_utils | |
| parent | 18fe295d33b64da533790b44f573c67bb4ba5245 (diff) | |
| download | rust-51145a20bfec060b3a5015d922125e886af91d39.tar.gz rust-51145a20bfec060b3a5015d922125e886af91d39.zip | |
Make builtin_deref just return a Ty
Diffstat (limited to 'clippy_utils')
| -rw-r--r-- | clippy_utils/src/qualify_min_const_fn.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clippy_utils/src/qualify_min_const_fn.rs b/clippy_utils/src/qualify_min_const_fn.rs index 325c9bee057..d8d26e21369 100644 --- a/clippy_utils/src/qualify_min_const_fn.rs +++ b/clippy_utils/src/qualify_min_const_fn.rs @@ -134,7 +134,7 @@ fn check_rvalue<'tcx>( ) => Err((span, "function pointer casts are not allowed in const fn".into())), Rvalue::Cast(CastKind::PointerCoercion(PointerCoercion::Unsize), op, cast_ty) => { let pointee_ty = if let Some(deref_ty) = cast_ty.builtin_deref(true) { - deref_ty.ty + deref_ty } else { // We cannot allow this for now. return Err((span, "unsizing casts are only allowed for references right now".into())); |
