diff options
| author | Patrick Walton <pcwalton@mimiga.net> | 2013-05-23 19:12:16 -0700 |
|---|---|---|
| committer | Patrick Walton <pcwalton@mimiga.net> | 2013-05-29 19:04:50 -0700 |
| commit | aeda178011775f4a8e16446341fe4774e02d8f5f (patch) | |
| tree | 6e96ca95949ebee511eea69ebe1a854cc31dee0a /src/libstd/task | |
| parent | b5da389d36ec9108f82bb7025eabb7ce4f26b103 (diff) | |
| download | rust-aeda178011775f4a8e16446341fe4774e02d8f5f.tar.gz rust-aeda178011775f4a8e16446341fe4774e02d8f5f.zip | |
librustc: Redo the unsafe checker and make unsafe methods not callable from safe code
Diffstat (limited to 'src/libstd/task')
| -rw-r--r-- | src/libstd/task/spawn.rs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/libstd/task/spawn.rs b/src/libstd/task/spawn.rs index 5941221821a..56b1fb43ff1 100644 --- a/src/libstd/task/spawn.rs +++ b/src/libstd/task/spawn.rs @@ -159,13 +159,17 @@ struct AncestorList(Option<Exclusive<AncestorNode>>); // Accessors for taskgroup arcs and ancestor arcs that wrap the unsafety. #[inline(always)] fn access_group<U>(x: &TaskGroupArc, blk: &fn(TaskGroupInner) -> U) -> U { - x.with(blk) + unsafe { + x.with(blk) + } } #[inline(always)] fn access_ancestors<U>(x: &Exclusive<AncestorNode>, blk: &fn(x: &mut AncestorNode) -> U) -> U { - x.with(blk) + unsafe { + x.with(blk) + } } // Iterates over an ancestor list. |
