about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src/check/intrinsicck.rs
diff options
context:
space:
mode:
authornxya <nathacutlan@gmail.com>2023-08-14 14:07:28 -0400
committernxya <nathacutlan@gmail.com>2023-08-14 14:07:46 -0400
commitcac7c127a270f90cc2ab3cb8179bf6bb2745a783 (patch)
treeb76974ee296a691bba4f0fa95c70f0b2507c1707 /compiler/rustc_hir_analysis/src/check/intrinsicck.rs
parentb08dd92552d663e3c877c8e5ce859e212205a09f (diff)
downloadrust-cac7c127a270f90cc2ab3cb8179bf6bb2745a783.tar.gz
rust-cac7c127a270f90cc2ab3cb8179bf6bb2745a783.zip
fixed *const [type error] does not implement the Copy trait
Diffstat (limited to 'compiler/rustc_hir_analysis/src/check/intrinsicck.rs')
-rw-r--r--compiler/rustc_hir_analysis/src/check/intrinsicck.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_hir_analysis/src/check/intrinsicck.rs b/compiler/rustc_hir_analysis/src/check/intrinsicck.rs
index b0dd5e5787d..945953edd5a 100644
--- a/compiler/rustc_hir_analysis/src/check/intrinsicck.rs
+++ b/compiler/rustc_hir_analysis/src/check/intrinsicck.rs
@@ -68,7 +68,7 @@ impl<'a, 'tcx> InlineAsmCtxt<'a, 'tcx> {
         let asm_ty = match *ty.kind() {
             // `!` is allowed for input but not for output (issue #87802)
             ty::Never if is_input => return None,
-            ty::Error(_) => return None,
+            _ if ty.references_error() => return None,
             ty::Int(IntTy::I8) | ty::Uint(UintTy::U8) => Some(InlineAsmType::I8),
             ty::Int(IntTy::I16) | ty::Uint(UintTy::U16) => Some(InlineAsmType::I16),
             ty::Int(IntTy::I32) | ty::Uint(UintTy::U32) => Some(InlineAsmType::I32),