about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAmanieu d'Antras <amanieu@gmail.com>2023-12-12 19:55:43 +0000
committerAmanieu d'Antras <amanieu@gmail.com>2024-02-12 14:02:30 +0000
commitfb5ed2986e7d999d57e907f2c3351a1b3dac59c3 (patch)
tree2b79473dc85dd343b3157433b12cb5fe8611cc30 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentb17491c8f6d555386104dfd82004c01bfef09c95 (diff)
downloadrust-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