diff options
| author | bors <bors@rust-lang.org> | 2023-11-09 23:33:46 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-11-09 23:33:46 +0000 |
| commit | 6be0f7414d958edf45dc0dabae33b259731ad040 (patch) | |
| tree | 9d4dd63255d8ef82e76197e2d4d37108c98fbd80 /tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs | |
| parent | 34b7d1559f03f4a35316ed2a5261a87b591834bb (diff) | |
| parent | eabc64f56c4a907b942881b94815cbe2150e39db (diff) | |
| download | rust-6be0f7414d958edf45dc0dabae33b259731ad040.tar.gz rust-6be0f7414d958edf45dc0dabae33b259731ad040.zip | |
Auto merge of #11780 - Jacherr:vec-allocator-nolint, r=xFrednet
Disable `vec_box` when using different allocators
Fixes #7114
This PR disables the `vec_box` lint when the `Box` and `Vec` use different allocators (but not when they use the same - custom - allocator).
For example - `Vec<Box<i32, DummyAllocator>>` will disable the lint, and `Vec<Box<i32, DummyAllocator>, DummyAllocator>` will not disable the lint.
In addition, the applicability of this lint has been changed to `Unspecified` due to the automatic fixes potentially breaking code such as the following:
```rs
fn foo() -> Vec<Box<i32>> { // -> Vec<i32>
vec![Box::new(1)]
}
```
It should be noted that the `if_chain->let-chains` fix has also been applied to this lint, so the diff does contain many changes.
changelog: disable `vec_box` lint when using nonstandard allocators
Diffstat (limited to 'tests/codegen/src-hash-algorithm/src-hash-algorithm-sha256.rs')
0 files changed, 0 insertions, 0 deletions
