diff options
| author | bors <bors@rust-lang.org> | 2014-03-31 15:51:33 -0700 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-03-31 15:51:33 -0700 |
| commit | b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64 (patch) | |
| tree | 1e66451d207e19694d62608a8e1724c71796dc00 /src/libstd/rt/task.rs | |
| parent | a7e057d402a345f547e67a326871621472d04035 (diff) | |
| parent | 37a3131640d0fa2633aa26db7f849d110250ce51 (diff) | |
| download | rust-b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64.tar.gz rust-b8ef9fd9c9f642ce7b8aed82782a1ed745d08d64.zip | |
auto merge of #13184 : alexcrichton/rust/priv-fields, r=brson
This is an implementation of a portion of [RFC #4](https://github.com/rust-lang/rfcs/blob/master/active/0004-private-fields.md). This PR makes named struct fields private by default (as opposed to inherited by default). The only real meaty change is the first commit to `rustc`, all other commits are just fallout of that change. Summary of changes made: * Named fields are private by default *everywhere* * The `priv` keyword is now default-deny on named fields (done in a "lint" pass in privacy) Changes yet to be done (before the RFC is closed) * Change tuple structs to have private fields by default * Remove `priv` enum variants * Make `priv` a reserved keyword
Diffstat (limited to 'src/libstd/rt/task.rs')
| -rw-r--r-- | src/libstd/rt/task.rs | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/libstd/rt/task.rs b/src/libstd/rt/task.rs index 211c09977d4..d9700ea9980 100644 --- a/src/libstd/rt/task.rs +++ b/src/libstd/rt/task.rs @@ -43,18 +43,18 @@ use unstable::finally::Finally; /// in the struct. This contains a pointer to another struct that holds /// the type-specific state. pub struct Task { - heap: LocalHeap, - gc: GarbageCollector, - storage: LocalStorage, - unwinder: Unwinder, - death: Death, - destroyed: bool, - name: Option<SendStr>, - - stdout: Option<~Writer:Send>, - stderr: Option<~Writer:Send>, - - priv imp: Option<~Runtime:Send>, + pub heap: LocalHeap, + pub gc: GarbageCollector, + pub storage: LocalStorage, + pub unwinder: Unwinder, + pub death: Death, + pub destroyed: bool, + pub name: Option<SendStr>, + + pub stdout: Option<~Writer:Send>, + pub stderr: Option<~Writer:Send>, + + imp: Option<~Runtime:Send>, } pub struct GarbageCollector; @@ -77,11 +77,11 @@ pub enum DeathAction { /// Per-task state related to task death, killing, failure, etc. pub struct Death { - on_exit: Option<DeathAction>, + pub on_exit: Option<DeathAction>, } pub struct BlockedTasks { - priv inner: UnsafeArc<AtomicUint>, + inner: UnsafeArc<AtomicUint>, } impl Task { |
