Skip to content

Commit 3d9cf15

Browse files
committed
Remove half-baked 'opacity' layer qualifier.
1 parent b7d680b commit 3d9cf15

File tree

11 files changed

+4
-69
lines changed

11 files changed

+4
-69
lines changed

doc/rust.texi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,6 @@ The keywords are:
678678
@tab @code{auto}
679679
@item @code{state}
680680
@tab @code{gc}
681-
@tab @code{abs}
682681
@tab @code{const}
683682
@tab @code{thread}
684683
@item @code{auth}

src/boot/fe/ast.ml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,6 @@ type layer =
3737
| LAYER_gc
3838
;;
3939

40-
type opacity =
41-
OPA_transparent
42-
| OPA_abstract
43-
;;
44-
4540
type mutability =
4641
MUT_mutable
4742
| MUT_immutable
@@ -720,22 +715,6 @@ and fmt_layer_qual
720715
fmt_layer ff s;
721716
if s <> LAYER_value then fmt ff " ";
722717

723-
and fmt_opacity
724-
(ff:Format.formatter)
725-
(opa:opacity)
726-
: unit =
727-
match opa with
728-
OPA_transparent -> ()
729-
| OPA_abstract -> fmt ff "abs"
730-
731-
and fmt_opacity_qual
732-
(ff:Format.formatter)
733-
(op:opacity)
734-
: unit =
735-
fmt_opacity ff op;
736-
if op <> OPA_transparent then fmt ff " ";
737-
738-
739718
and fmt_ty_fn
740719
(ff:Format.formatter)
741720
(ident_and_params:(ident * ty_param array) option)

src/boot/fe/item.ml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -609,8 +609,7 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array =
609609
spans ps stmts apos (Ast.STMT_join lval)
610610

611611

612-
| STATE | GC
613-
| ABS | NATIVE
612+
| STATE | GC | NATIVE
614613
| MOD | OBJ | TAG | TYPE | FN | USE ->
615614
let items = ctxt "stmt: decl" parse_mod_item ps in
616615
let bpos = lexpos ps in
@@ -695,7 +694,6 @@ and parse_stmts_including_none (ps:pstate) : Ast.stmt array =
695694

696695
and parse_ty_param (iref:int ref) (ps:pstate) : Ast.ty_param identified =
697696
let apos = lexpos ps in
698-
let _ = Pexp.parse_opacity ps in
699697
let s = Pexp.parse_layer ps in
700698
let ident = Pexp.parse_ident ps in
701699
let i = !iref in
@@ -990,9 +988,8 @@ and parse_mod_item (ps:pstate)
990988

991989
match peek ps with
992990

993-
STATE | GC | ABS
991+
STATE | GC
994992
| TYPE | OBJ | TAG | FN | ITER ->
995-
let _ = Pexp.parse_opacity ps in
996993
let layer = Pexp.parse_layer ps in
997994
begin
998995
match peek ps with

src/boot/fe/lexer.mll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@
9595
("claim", CLAIM);
9696
("prove", PROVE);
9797

98-
("abs", ABS);
99-
10098
("state", STATE);
10199
("gc", GC);
102100

src/boot/fe/pexp.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,6 @@ and parse_optional_trailing_constrs (ps:pstate) : Ast.constrs =
140140
COLON -> (bump ps; parse_constrs ps)
141141
| _ -> [| |]
142142

143-
and parse_opacity (ps:pstate) : Ast.opacity =
144-
match peek ps with
145-
ABS -> bump ps; Ast.OPA_abstract
146-
| _ -> Ast.OPA_transparent
147-
148143
and parse_layer (ps:pstate) : Ast.layer =
149144
match peek ps with
150145
STATE -> bump ps; Ast.LAYER_state

src/boot/fe/token.ml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@ type token =
8080
| CLAIM
8181
| PROVE
8282

83-
(* Opacity keywords *)
84-
| ABS
85-
8683
(* Layer keywords *)
8784
| STATE
8885
| GC
@@ -243,9 +240,6 @@ let rec string_of_tok t =
243240
| CLAIM -> "claim"
244241
| PROVE -> "prove"
245242

246-
(* Opacity keywords *)
247-
| ABS -> "abs"
248-
249243
(* Layer keywords *)
250244
| STATE -> "state"
251245
| GC -> "gc"

src/comp/front/ast.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,6 @@ tag mutability {
119119
maybe_mut;
120120
}
121121

122-
tag opacity {
123-
op_abstract;
124-
op_transparent;
125-
}
126-
127122
tag layer {
128123
layer_value;
129124
layer_state;

src/comp/front/lexer.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ fn keyword_table() -> std.map.hashmap[str, token.token] {
130130
keywords.insert("claim", token.CLAIM);
131131
keywords.insert("prove", token.PROVE);
132132

133-
keywords.insert("abs", token.ABS);
134-
135133
keywords.insert("state", token.STATE);
136134
keywords.insert("gc", token.GC);
137135

src/comp/front/parser.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1951,7 +1951,6 @@ fn parse_item_native_fn(parser p) -> @ast.native_item {
19511951
}
19521952

19531953
fn parse_native_item(parser p) -> @ast.native_item {
1954-
let ast.opacity opa = parse_opacity(p);
19551954
let ast.layer lyr = parse_layer(p);
19561955
alt (p.peek()) {
19571956
case (token.TYPE) {
@@ -2106,18 +2105,6 @@ fn parse_item_tag(parser p) -> @ast.item {
21062105
ret @spanned(lo, hi, item);
21072106
}
21082107

2109-
fn parse_opacity(parser p) -> ast.opacity {
2110-
alt (p.peek()) {
2111-
case (token.ABS) {
2112-
p.bump();
2113-
ret ast.op_abstract;
2114-
}
2115-
case (_) {
2116-
ret ast.op_transparent;
2117-
}
2118-
}
2119-
fail;
2120-
}
21212108

21222109
fn parse_layer(parser p) -> ast.layer {
21232110
alt (p.peek()) {
@@ -2167,7 +2154,6 @@ fn peeking_at_item(parser p) -> bool {
21672154
}
21682155

21692156
fn parse_item(parser p) -> @ast.item {
2170-
let ast.opacity opa = parse_opacity(p);
21712157
let ast.layer lyr = parse_layer(p);
21722158

21732159
alt (p.peek()) {

src/comp/front/token.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ tag token {
9393
CLAIM;
9494
PROVE;
9595

96-
/* Opacity keywords */
97-
ABS;
98-
9996
/* Layer keywords */
10097
STATE;
10198
GC;
@@ -265,9 +262,6 @@ fn to_str(token t) -> str {
265262
case (CLAIM) { ret "claim"; }
266263
case (PROVE) { ret "prove"; }
267264

268-
/* Opacity keywords */
269-
case (ABS) { ret "abs"; }
270-
271265
/* Layer keywords */
272266
case (STATE) { ret "state"; }
273267
case (GC) { ret "gc"; }

src/lib/map.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
type hashfn[K] = fn(&K) -> uint;
77
type eqfn[K] = fn(&K, &K) -> bool;
88

9-
abs state type hashmap[K, V] = state obj {
9+
state type hashmap[K, V] = state obj {
1010
fn size() -> uint;
1111
fn insert(&K key, &V val) -> bool;
1212
fn contains_key(&K key) -> bool;
@@ -241,5 +241,5 @@ fn mk_hashmap[K, V](&hashfn[K] hasher, &eqfn[K] eqer) -> hashmap[K, V] {
241241
// indent-tabs-mode: nil
242242
// c-basic-offset: 4
243243
// buffer-file-coding-system: utf-8-unix
244-
// compile-command: "make -k -C .. 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
244+
// compile-command: "make -k -C $RBUILD 2>&1 | sed -e 's/\\/x\\//x:\\//g'";
245245
// End:

0 commit comments

Comments
 (0)