Skip to content

Commit a8dd52e

Browse files
committed
Remove last traces of auth keyword
The reference now has an empty hole where the auth keyword used to be. Changing the keyword table seems to require manually sorting the keywords and putting them back into some kind of arcane interleaved order. I'll open an issue to actually fix this. Closes #1211
1 parent 93e8783 commit a8dd52e

File tree

8 files changed

+1
-43
lines changed

8 files changed

+1
-43
lines changed

doc/rust.texi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ The keywords are:
636636
@tab @code{if}
637637
@tab @code{pure}
638638
@tab @code{uint}
639-
@item @code{auth}
639+
@item @code{}
640640
@tab @code{export}
641641
@tab @code{import}
642642
@tab @code{resource}

src/comp/rustc.rc

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,10 +127,6 @@ mod util {
127127
mod filesearch;
128128
}
129129

130-
auth middle::metadata = unsafe;
131-
auth middle::trans = unsafe;
132-
auth lib::llvm = unsafe;
133-
134130
mod lib {
135131
mod llvm;
136132
}

src/comp/syntax/ast.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ tag crate_directive_ {
6262
cdir_dir_mod(ident, option::t<filename>, [@crate_directive], [attribute]);
6363
cdir_view_item(@view_item);
6464
cdir_syntax(path);
65-
cdir_auth(path, _auth);
6665
}
6766

6867
type crate_directive = spanned<crate_directive_>;
@@ -101,8 +100,6 @@ tag mutability { mut; imm; maybe_mut; }
101100

102101
tag kind { kind_sendable; kind_copyable; kind_noncopyable; }
103102

104-
tag _auth { auth_unsafe; }
105-
106103
tag proto_sugar {
107104
sugar_normal;
108105
sugar_sexy;

src/comp/syntax/fold.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,6 @@ fn noop_fold_crate_directive(cd: crate_directive_, fld: ast_fold) ->
168168
}
169169
cdir_view_item(vi) { cdir_view_item(fld.fold_view_item(vi)) }
170170
cdir_syntax(_) { cd }
171-
cdir_auth(_, _) { cd }
172171
}
173172
}
174173

src/comp/syntax/parse/eval.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,6 @@ fn eval_crate_directive(cx: ctx, cdir: @ast::crate_directive, prefix: str,
133133
}
134134
ast::cdir_view_item(vi) { view_items += [vi]; }
135135
ast::cdir_syntax(pth) { }
136-
ast::cdir_auth(pth, eff) { }
137136
}
138137
}
139138
//

src/comp/syntax/parse/parser.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,12 +2112,6 @@ fn parse_item_tag(p: parser, attrs: [ast::attribute]) -> @ast::item {
21122112
ret mk_item(p, lo, hi, id, ast::item_tag(variants, ty_params), attrs);
21132113
}
21142114

2115-
fn parse_auth(p: parser) -> ast::_auth {
2116-
if eat_word(p, "unsafe") {
2117-
ret ast::auth_unsafe;
2118-
} else { unexpected(p, p.peek()); }
2119-
}
2120-
21212115
fn parse_fn_item_proto(_p: parser) -> ast::proto {
21222116
ast::proto_bare
21232117
}
@@ -2529,13 +2523,6 @@ fn parse_crate_directive(p: parser, first_outer_attr: [ast::attribute]) ->
25292523
}
25302524
t { unexpected(p, t); }
25312525
}
2532-
} else if eat_word(p, "auth") {
2533-
let n = parse_path(p);
2534-
expect(p, token::EQ);
2535-
let a = parse_auth(p);
2536-
let hi = p.get_hi_pos();
2537-
expect(p, token::SEMI);
2538-
ret spanned(lo, hi, ast::cdir_auth(n, a));
25392526
} else if is_view_item(p) {
25402527
let vi = parse_view_item(p);
25412528
ret spanned(lo, vi.span.hi, ast::cdir_view_item(vi));

src/comp/syntax/visit.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ fn visit_crate_directive<E>(cd: @crate_directive, e: E, v: vt<E>) {
6464
}
6565
cdir_view_item(vi) { v.visit_view_item(vi, e, v); }
6666
cdir_syntax(_) { }
67-
cdir_auth(_, _) { }
6867
}
6968
}
7069

src/lib/std.rc

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -114,25 +114,6 @@ mod os = "linux_os.rs";
114114
#[cfg(target_os = "linux")]
115115
mod os_fs = "posix_fs.rs";
116116

117-
118-
// FIXME: This doesn't do anything.
119-
// Authorize various rule-bendings.
120-
121-
auth io = unsafe;
122-
auth fs = unsafe;
123-
auth os_fs = unsafe;
124-
auth run = unsafe;
125-
auth str = unsafe;
126-
auth vec = unsafe;
127-
auth task = unsafe;
128-
129-
auth dbg = unsafe;
130-
131-
auth uint::next_power_of_two = unsafe;
132-
auth map::mk_hashmap = unsafe;
133-
auth rand::mk_rng = unsafe;
134-
135-
136117
// Local Variables:
137118
// mode: rust;
138119
// fill-column: 78;

0 commit comments

Comments
 (0)