1
Fork 0

Rollup merge of #114752 - RickleAndMortimer:issue-113788-fix, r=compiler-errors

fixed *const [type error] does not implement the Copy trait

Removes "error: arguments for inline assembly must be copyable" when moving an unknown type

Fixes: #113788
This commit is contained in:
Matthias Krüger 2023-08-14 21:57:51 +02:00 committed by GitHub
commit 378c2fd644
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 17 additions and 1 deletions

View file

@ -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),