mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
Promote 'pub' and 'priv' from restricted to strict keywords
This commit is contained in:
parent
8672b9003f
commit
fb851242b7
@ -67,7 +67,7 @@ export option_iter;
|
|||||||
|
|
||||||
// This creates some APIs that I do not want to commit to, but it must be
|
// 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).
|
// exported from core in order for uv to remain in std (see #2648).
|
||||||
export priv;
|
export private;
|
||||||
|
|
||||||
|
|
||||||
// Built-in-type support modules
|
// Built-in-type support modules
|
||||||
@ -241,7 +241,7 @@ mod rt;
|
|||||||
// For internal use, not exported
|
// For internal use, not exported
|
||||||
|
|
||||||
mod unicode;
|
mod unicode;
|
||||||
mod priv;
|
mod private;
|
||||||
mod cmath;
|
mod cmath;
|
||||||
mod stackwalk;
|
mod stackwalk;
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ mod global_env {
|
|||||||
fn get_global_env_chan() -> comm::Chan<Msg> {
|
fn get_global_env_chan() -> comm::Chan<Msg> {
|
||||||
let global_ptr = rustrt::rust_global_env_chan_ptr();
|
let global_ptr = rustrt::rust_global_env_chan_ptr();
|
||||||
unsafe {
|
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
|
// FIXME (#2621): This would be a good place to use a very
|
||||||
// small foreign stack
|
// small foreign stack
|
||||||
task::task().sched_mode(task::SingleThreaded).unlinked()
|
task::task().sched_mode(task::SingleThreaded).unlinked()
|
||||||
@ -184,7 +184,7 @@ mod global_env {
|
|||||||
|
|
||||||
fn global_env_task(msg_po: comm::Port<Msg>) {
|
fn global_env_task(msg_po: comm::Port<Msg>) {
|
||||||
unsafe {
|
unsafe {
|
||||||
do priv::weaken_task |weak_po| {
|
do private::weaken_task |weak_po| {
|
||||||
loop {
|
loop {
|
||||||
match comm::select2(msg_po, weak_po) {
|
match comm::select2(msg_po, weak_po) {
|
||||||
either::Left(MsgGetEnv(n, resp_ch)) => {
|
either::Left(MsgGetEnv(n, resp_ch)) => {
|
||||||
|
@ -6,7 +6,7 @@ use ll = uv_ll;
|
|||||||
use iotask = uv_iotask;
|
use iotask = uv_iotask;
|
||||||
use get_gl = get;
|
use get_gl = get;
|
||||||
use iotask::{IoTask, spawn_iotask};
|
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 = core::comm;
|
||||||
use comm::{Port, Chan, select2, listen};
|
use comm::{Port, Chan, select2, listen};
|
||||||
use task::TaskBuilder;
|
use task::TaskBuilder;
|
||||||
|
@ -414,7 +414,6 @@ fn restricted_keyword_table() -> HashMap<~str, ()> {
|
|||||||
~"const", ~"copy",
|
~"const", ~"copy",
|
||||||
~"fail", ~"fn",
|
~"fail", ~"fn",
|
||||||
~"impl",
|
~"impl",
|
||||||
~"priv", ~"pub",
|
|
||||||
~"unsafe"
|
~"unsafe"
|
||||||
];
|
];
|
||||||
for keys.each |word| {
|
for keys.each |word| {
|
||||||
@ -435,7 +434,7 @@ fn strict_keyword_table() -> HashMap<~str, ()> {
|
|||||||
~"if",
|
~"if",
|
||||||
~"let", ~"log", ~"loop",
|
~"let", ~"log", ~"loop",
|
||||||
~"match", ~"mod", ~"move", ~"mut",
|
~"match", ~"mod", ~"move", ~"mut",
|
||||||
~"pure",
|
~"priv", ~"pub", ~"pure",
|
||||||
~"ref", ~"return",
|
~"ref", ~"return",
|
||||||
~"struct",
|
~"struct",
|
||||||
~"true", ~"trait", ~"type",
|
~"true", ~"trait", ~"type",
|
||||||
|
Loading…
Reference in New Issue
Block a user