diff options
| author | bors <bors@rust-lang.org> | 2013-04-08 18:36:57 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2013-04-08 18:36:57 -0700 |
| commit | 30dbbe17c9189fed32d0f5f332b4f6ff8f7cc4aa (patch) | |
| tree | 3a13a4df0a798bdb55dc87e23188f8a975bd4691 /src/rustllvm/RustWrapper.cpp | |
| parent | 22f65e9852e71645ab6552106225857bced327a2 (diff) | |
| parent | 255193cc1af5e07753906ad18bae077b45b5c3f0 (diff) | |
| download | rust-30dbbe17c9189fed32d0f5f332b4f6ff8f7cc4aa.tar.gz rust-30dbbe17c9189fed32d0f5f332b4f6ff8f7cc4aa.zip | |
auto merge of #5787 : alexcrichton/rust/less-mut-fields, r=catamorphism
This removes some of the easier instances of mutable fields where the explicit self can just become `&mut self` along with removing some unsafe blocks which aren't necessary any more now that purity is gone.
Most of #4568 is done, except for [one case](https://github.com/alexcrichton/rust/blob/less-mut-fields/src/libcore/vec.rs#L1754) where it looks like it has to do with it being a `const` vector. Removing the unsafe block yields:
```
/Users/alex/code/rust2/src/libcore/vec.rs:1755:12: 1755:16 error: illegal borrow unless pure: creating immutable alias to const vec content
/Users/alex/code/rust2/src/libcore/vec.rs:1755 for self.each |e| {
^~~~
/Users/alex/code/rust2/src/libcore/vec.rs:1757:8: 1757:9 note: impure due to access to impure function
/Users/alex/code/rust2/src/libcore/vec.rs:1757 }
^
error: aborting due to previous error
```
I also didn't delve too much into removing mutable fields with `Cell` or `transmute` and friends.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
