diff options
| author | Amanieu d'Antras <amanieu@gmail.com> | 2023-12-12 19:55:43 +0000 |
|---|---|---|
| committer | Amanieu d'Antras <amanieu@gmail.com> | 2024-02-12 14:02:30 +0000 |
| commit | fb5ed2986e7d999d57e907f2c3351a1b3dac59c3 (patch) | |
| tree | 2b79473dc85dd343b3157433b12cb5fe8611cc30 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | b17491c8f6d555386104dfd82004c01bfef09c95 (diff) | |
| download | rust-fb5ed2986e7d999d57e907f2c3351a1b3dac59c3.tar.gz rust-fb5ed2986e7d999d57e907f2c3351a1b3dac59c3.zip | |
Clarify the lifetimes of allocations returned by the `Allocator` trait
The previous definition (accidentally) disallowed the implementation of
stack-based allocators whose memory would become invalid once the
lifetime of the allocator type ended.
This also ensures the validity of the following blanket implementation:
```rust
impl<A: Allocator> Allocator for &'_ A {}
```
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
