diff options
| author | bors <bors@rust-lang.org> | 2013-05-20 23:55:20 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-05-20 23:55:20 -0700 |
| commit | 5a3e3205144969fe9a9ec724929d641f309a6162 (patch) | |
| tree | e8ba741b28071f02dc553238f8b3e24496f8b676 /src/rustllvm/RustWrapper.cpp | |
| parent | d49a9dbc7ff342804112906760d87604f14f22c5 (diff) | |
| parent | 82fa0018c80c8f64cb1b446a7e59492d9ad97b1d (diff) | |
| download | rust-5a3e3205144969fe9a9ec724929d641f309a6162.tar.gz rust-5a3e3205144969fe9a9ec724929d641f309a6162.zip | |
auto merge of #6647 : alexcrichton/rust/unnecessary-alloc, r=graydon
This adds a lint mode for detecting unnecessary allocations on the heap. This isn't super fancy, currently it only has two rules 1. For a function's arguments, if you allocate a `[~|@]str` literal, when the type of the argument is a `&str`, emit a warning. 2. For the same case, emit warnings for boxed vectors when slices are required. After adding the lint, I rampaged through the libraries and removed all the unnecessary allocations I could find.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
