Commit a27191d
authored
Rollup merge of rust-lang#122018 - RalfJung:box-custom-alloc, r=oli-obk
only set noalias on Box with the global allocator
As discovered in rust-lang/miri#3341, `noalias` and custom allocators don't go well together.
rustc can now check whether a Box uses the global allocator. This replaces the previous ad-hoc and rather unprincipled check for a zero-sized allocator.
This is the rustc part of fixing that; Miri will also need a patch.2 files changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
| 54 | + | |
53 | 55 | | |
54 | 56 | | |
55 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2062 | 2062 | | |
2063 | 2063 | | |
2064 | 2064 | | |
| 2065 | + | |
| 2066 | + | |
| 2067 | + | |
2065 | 2068 | | |
2066 | 2069 | | |
2067 | 2070 | | |
| |||
0 commit comments