@@ -392,13 +392,13 @@ fn adjust_for_rust_scalar<'tcx>(
392392 // potentially self-referential types (see
393393 // <https://github.com/rust-lang/unsafe-code-guidelines/issues/381>). If LLVM had a way
394394 // to say "dereferenceable on entry" we could use it here.
395- attrs. pointee_size = match kind {
396- PointerKind :: Box { .. }
397- | PointerKind :: SharedRef { frozen : false }
398- | PointerKind :: MutableRef { unpin : false } => Size :: ZERO ,
399- PointerKind :: SharedRef { frozen : true }
400- | PointerKind :: MutableRef { unpin : true } => pointee. size ,
401- } ;
395+ // attrs.pointee_size = match kind {
396+ // PointerKind::Box { .. }
397+ // | PointerKind::SharedRef { frozen: false }
398+ // | PointerKind::MutableRef { unpin: false } => Size::ZERO,
399+ // PointerKind::SharedRef { frozen: true }
400+ // | PointerKind::MutableRef { unpin: true } => pointee.size,
401+ // };
402402
403403 // The aliasing rules for `Box<T>` are still not decided, but currently we emit
404404 // `noalias` for it. This can be turned off using an unstable flag.
@@ -424,11 +424,11 @@ fn adjust_for_rust_scalar<'tcx>(
424424 // We can never add `noalias` in return position; that LLVM attribute has some very surprising semantics
425425 // (see <https://github.com/rust-lang/unsafe-code-guidelines/issues/385#issuecomment-1368055745>).
426426 if no_alias && !is_return {
427- attrs. set ( ArgAttribute :: NoAlias ) ;
427+ // attrs.set(ArgAttribute::NoAlias);
428428 }
429429
430430 if matches ! ( kind, PointerKind :: SharedRef { frozen: true } ) && !is_return {
431- attrs. set ( ArgAttribute :: ReadOnly ) ;
431+ // attrs.set(ArgAttribute::ReadOnly);
432432 }
433433 }
434434 }
0 commit comments