rust/compiler/rustc_ty_utils/src
bors 442f997f98 Auto merge of #106371 - RalfJung:no-ret-position-noalias, r=nikic
do not add noalias in return position

`noalias` as a return attribute in LLVM indicates that the returned pointer does not alias anything else that is reachable from the caller, *including things reachable before this function call*. This is clearly not the case with a function like `fn id(Box<T>) -> Box<T>`, so we cannot use this attribute.

Fixes https://github.com/rust-lang/unsafe-code-guidelines/issues/385 (including an actual miscompilation that `@comex` managed to produce).
2023-01-03 04:54:03 +00:00
..
abi.rs do not add noalias in return position 2023-01-02 15:11:19 +01:00
assoc.rs Rename some OwnerId fields. 2022-10-29 20:28:38 +11:00
common_traits.rs Change InferCtxtBuilder from enter to build 2022-10-07 07:10:40 -05:00
consts.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
errors.rs Migrate all diagnostics 2022-10-23 10:09:44 +02:00
implied_bounds.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
instance.rs Rename some compare_method functions 2022-12-24 21:36:58 +00:00
layout_sanity_check.rs stricter alignment enforcement for ScalarPair and Vector 2022-11-28 15:09:56 +01:00
layout.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00
lib.rs Move has_structural_eq_impls provider to rustc_ty_utils 2022-12-08 05:16:48 +00:00
needs_drop.rs Combine identical alias arms 2022-12-13 17:48:55 +00:00
representability.rs Rewrite representability 2022-10-07 09:33:46 -05:00
structural_match.rs Move has_structural_eq_impls provider to rustc_ty_utils 2022-12-08 05:16:48 +00:00
ty.rs rustc: Remove needless lifetimes 2022-12-20 22:10:40 +01:00