Skip to content

Remove mutable fields from the language #6232

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 25 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
da2ac90
libstd: Remove mutable fields from fileinput and net_tcp
pcwalton May 3, 2013
92d2ec4
libstd: Remove mutable fields from flatpipes and io_util
pcwalton May 3, 2013
bba0680
libstd: Remove mutable fields from future and par
pcwalton May 3, 2013
ee78d81
libstd: Start warning about mutable fields, now that they only exist …
pcwalton May 3, 2013
b2d1ac1
libcore: Remove mutable fields from rand.
pcwalton May 3, 2013
2961997
libcore: Remove mutable fields from os and ptr
pcwalton May 3, 2013
4dc1c29
libcore: Remove mutable fields from hash
pcwalton May 3, 2013
226ee7d
libcore: Remove mutable fields from task::spawn
pcwalton May 3, 2013
803a4f4
libcore: Remove mutable fields from the task builder API
pcwalton May 3, 2013
6a44482
libcore: Remove mutable fields from pipes
pcwalton May 3, 2013
5650779
libcore: Remove mutable fields from repr
pcwalton May 3, 2013
8919f32
Remove mutable fields from comm by using casts. Also mark the cast in…
pcwalton May 3, 2013
d12d255
libcore: Remove more mutable fields from comm
pcwalton May 4, 2013
c752241
libstd: Remove some residual mutable fields
pcwalton May 4, 2013
db4573a
librustc: Remove mutable fields from the language.
pcwalton May 4, 2013
278b487
test: Fix tests and the pipe compiler
pcwalton May 7, 2013
99daec6
librustc: Fix merge fallout.
pcwalton May 7, 2013
49a66a5
librustc: Stop parsing modes and remove them entirely from the language
pcwalton May 7, 2013
16a0125
libcore: Fix tests.
pcwalton May 8, 2013
9d011eb
test: Fix tests.
pcwalton May 8, 2013
3affc6e
librustc: Fix merge fallout.
pcwalton May 8, 2013
7286845
libcore: Fix more merge fallout.
pcwalton May 8, 2013
36fbf71
llvm: Unrevert change
pcwalton May 8, 2013
85d9409
test: Fix broken test
pcwalton May 8, 2013
d20e63a
test: Fix modes in the benchmarks.
pcwalton May 9, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/libcore/at_vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ pub mod rustrt {
#[abi = "cdecl"]
#[link_name = "rustrt"]
pub extern {
pub unsafe fn vec_reserve_shared_actual(++t: *sys::TypeDesc,
++v: **vec::raw::VecRepr,
++n: libc::size_t);
pub unsafe fn vec_reserve_shared_actual(t: *sys::TypeDesc,
v: **vec::raw::VecRepr,
n: libc::size_t);
}
}

Expand Down Expand Up @@ -60,7 +60,7 @@ pub fn capacity<T>(v: @[T]) -> uint {
pub fn build_sized<A>(size: uint, builder: &fn(push: &fn(v: A))) -> @[A] {
let mut vec: @[A] = @[];
unsafe { raw::reserve(&mut vec, size); }
builder(|+x| unsafe { raw::push(&mut vec, x) });
builder(|x| unsafe { raw::push(&mut vec, x) });
return unsafe { transmute(vec) };
}

Expand Down
2 changes: 1 addition & 1 deletion src/libcore/cast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub mod rusti {
#[abi = "rust-intrinsic"]
#[link_name = "rusti"]
pub extern "rust-intrinsic" {
fn forget<T>(+x: T);
fn forget<T>(x: T);

fn transmute<T,U>(e: T) -> U;
}
Expand Down
Loading