Promote 'pub' and 'priv' from restricted to strict keywords

This commit is contained in:
Brian Anderson 2012-09-11 18:17:13 -07:00
parent 8672b9003f
commit fb851242b7
5 changed files with 6 additions and 7 deletions

View File

@ -67,7 +67,7 @@ export option_iter;
// This creates some APIs that I do not want to commit to, but it must be
// exported from core in order for uv to remain in std (see #2648).
export priv;
export private;
// Built-in-type support modules
@ -241,7 +241,7 @@ mod rt;
// For internal use, not exported
mod unicode;
mod priv;
mod private;
mod cmath;
mod stackwalk;

View File

@ -174,7 +174,7 @@ mod global_env {
fn get_global_env_chan() -> comm::Chan<Msg> {
let global_ptr = rustrt::rust_global_env_chan_ptr();
unsafe {
priv::chan_from_global_ptr(global_ptr, || {
private::chan_from_global_ptr(global_ptr, || {
// FIXME (#2621): This would be a good place to use a very
// small foreign stack
task::task().sched_mode(task::SingleThreaded).unlinked()
@ -184,7 +184,7 @@ mod global_env {
fn global_env_task(msg_po: comm::Port<Msg>) {
unsafe {
do priv::weaken_task |weak_po| {
do private::weaken_task |weak_po| {
loop {
match comm::select2(msg_po, weak_po) {
either::Left(MsgGetEnv(n, resp_ch)) => {

View File

@ -6,7 +6,7 @@ use ll = uv_ll;
use iotask = uv_iotask;
use get_gl = get;
use iotask::{IoTask, spawn_iotask};
use priv::{chan_from_global_ptr, weaken_task};
use private::{chan_from_global_ptr, weaken_task};
use comm = core::comm;
use comm::{Port, Chan, select2, listen};
use task::TaskBuilder;

View File

@ -414,7 +414,6 @@ fn restricted_keyword_table() -> HashMap<~str, ()> {
~"const", ~"copy",
~"fail", ~"fn",
~"impl",
~"priv", ~"pub",
~"unsafe"
];
for keys.each |word| {
@ -435,7 +434,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
~"if",
~"let", ~"log", ~"loop",
~"match", ~"mod", ~"move", ~"mut",
~"pure",
~"priv", ~"pub", ~"pure",
~"ref", ~"return",
~"struct",
~"true", ~"trait", ~"type",