Skip to content

Commit 959ec17

Browse files
committed
---
yaml --- r: 90103 b: refs/heads/master c: f09b7b0 h: refs/heads/master i: 90101: a8cc465 90099: f75027e 90095: 54e9e3f v: v3
1 parent 0738b72 commit 959ec17

File tree

8 files changed

+26
-55
lines changed

8 files changed

+26
-55
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 23674be0b1ff920773520c7fec96c3a4b2068b21
2+
refs/heads/master: f09b7b0ecd7fc03c9d433632f89b3267f16cd4f8
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/librustc/lib/llvm.rs

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -128,62 +128,22 @@ pub enum RealPredicate {
128128

129129
// The LLVM TypeKind type - must stay in sync with the def of
130130
// LLVMTypeKind in llvm/include/llvm-c/Core.h
131-
#[cfg(not(stage0))]
132-
#[deriving(Eq)]
133-
#[repr(C)]
134-
pub enum TypeKind {
135-
Void = 0,
136-
Half = 1,
137-
Float = 2,
138-
Double = 3,
139-
X86_FP80 = 4,
140-
FP128 = 5,
141-
PPC_FP128 = 6,
142-
Label = 7,
143-
Integer = 8,
144-
Function = 9,
145-
Struct = 10,
146-
Array = 11,
147-
Pointer = 12,
148-
Vector = 13,
149-
Metadata = 14,
150-
X86_MMX = 15,
151-
}
152-
153-
// NOTE remove these after snapshot. (See also #10308.)
154-
#[cfg(stage0)]
155131
pub type TypeKind = u32;
156-
#[cfg(stage0)]
157132
pub static Void: TypeKind = 0;
158-
#[cfg(stage0)]
159133
pub static Half: TypeKind = 1;
160-
#[cfg(stage0)]
161134
pub static Float: TypeKind = 2;
162-
#[cfg(stage0)]
163135
pub static Double: TypeKind = 3;
164-
#[cfg(stage0)]
165136
pub static X86_FP80: TypeKind = 4;
166-
#[cfg(stage0)]
167137
pub static FP128: TypeKind = 5;
168-
#[cfg(stage0)]
169138
pub static PPC_FP128: TypeKind = 6;
170-
#[cfg(stage0)]
171139
pub static Label: TypeKind = 7;
172-
#[cfg(stage0)]
173140
pub static Integer: TypeKind = 8;
174-
#[cfg(stage0)]
175141
pub static Function: TypeKind = 9;
176-
#[cfg(stage0)]
177142
pub static Struct: TypeKind = 10;
178-
#[cfg(stage0)]
179143
pub static Array: TypeKind = 11;
180-
#[cfg(stage0)]
181144
pub static Pointer: TypeKind = 12;
182-
#[cfg(stage0)]
183145
pub static Vector: TypeKind = 13;
184-
#[cfg(stage0)]
185146
pub static Metadata: TypeKind = 14;
186-
#[cfg(stage0)]
187147
pub static X86_MMX: TypeKind = 15;
188148

189149
#[repr(C)]

trunk/src/libsyntax/ast.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,14 +612,14 @@ pub enum token_tree {
612612
tt_tok(Span, ::parse::token::Token),
613613
// a delimited sequence (the delimiters appear as the first
614614
// and last elements of the vector)
615-
tt_delim(@mut ~[token_tree]),
615+
tt_delim(@~[token_tree]),
616616

617617
// These only make sense for right-hand-sides of MBE macros:
618618

619619
// a kleene-style repetition sequence with a span, a tt_forest,
620620
// an optional separator, and a boolean where true indicates
621621
// zero or more (*), and false indicates one or more (+).
622-
tt_seq(Span, @mut ~[token_tree], Option<::parse::token::Token>, bool),
622+
tt_seq(Span, @~[token_tree], Option<::parse::token::Token>, bool),
623623

624624
// a syntactic variable that will be filled in by macro expansion.
625625
tt_nonterminal(Span, Ident)
@@ -1180,6 +1180,18 @@ pub enum inlined_item {
11801180
ii_foreign(@foreign_item),
11811181
}
11821182

1183+
#[cfg(test)]
1184+
mod test {
1185+
use super::*;
1186+
1187+
fn is_freeze<T: Freeze>() {}
1188+
1189+
// Assert that the AST remains Freeze (#10693).
1190+
#[test] fn ast_is_freeze() {
1191+
is_freeze::<item>();
1192+
}
1193+
}
1194+
11831195
/* hold off on tests ... they appear in a later merge.
11841196
#[cfg(test)]
11851197
mod test {

trunk/src/libsyntax/ext/log_syntax.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub fn expand_syntax_ext(cx: @ExtCtxt,
2323
cx.print_backtrace();
2424
println(
2525
print::pprust::tt_to_str(
26-
&ast::tt_delim(@mut tt.to_owned()),
26+
&ast::tt_delim(@tt.to_owned()),
2727
get_ident_interner()));
2828

2929
//trivial expression

trunk/src/libsyntax/ext/tt/macro_rules.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ fn generic_extension(cx: @ExtCtxt,
104104
println!("{}! \\{ {} \\}",
105105
cx.str_of(name),
106106
print::pprust::tt_to_str(
107-
&ast::tt_delim(@mut arg.to_owned()),
107+
&ast::tt_delim(@arg.to_owned()),
108108
get_ident_interner()));
109109
}
110110

trunk/src/libsyntax/ext/tt/transcribe.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::option;
2222

2323
///an unzipping of `token_tree`s
2424
struct TtFrame {
25-
forest: @mut ~[ast::token_tree],
25+
forest: @~[ast::token_tree],
2626
idx: uint,
2727
dotdotdoted: bool,
2828
sep: Option<Token>,
@@ -52,7 +52,7 @@ pub fn new_tt_reader(sp_diag: @mut span_handler,
5252
let r = @mut TtReader {
5353
sp_diag: sp_diag,
5454
stack: @mut TtFrame {
55-
forest: @mut src,
55+
forest: @src,
5656
idx: 0u,
5757
dotdotdoted: false,
5858
sep: None,
@@ -74,7 +74,7 @@ pub fn new_tt_reader(sp_diag: @mut span_handler,
7474

7575
fn dup_tt_frame(f: @mut TtFrame) -> @mut TtFrame {
7676
@mut TtFrame {
77-
forest: @mut (*f.forest).clone(),
77+
forest: @(*f.forest).clone(),
7878
idx: f.idx,
7979
dotdotdoted: f.dotdotdoted,
8080
sep: f.sep.clone(),
@@ -175,8 +175,7 @@ pub fn tt_next_token(r: &mut TtReader) -> TokenAndSpan {
175175
loop {
176176
{
177177
let stack = &mut *r.stack;
178-
let forest = &mut *stack.forest;
179-
if stack.idx < forest.len() {
178+
if stack.idx < stack.forest.len() {
180179
break;
181180
}
182181
}

trunk/src/libsyntax/fold.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -457,10 +457,10 @@ pub fn fold_tts<T:ast_fold>(tts: &[token_tree], fld: &T) -> ~[token_tree] {
457457
match *tt {
458458
tt_tok(span, ref tok) =>
459459
tt_tok(span,maybe_fold_ident(tok,fld)),
460-
tt_delim(ref tts) => tt_delim(@mut fold_tts(**tts, fld)),
461-
tt_seq(span, ref pattern, ref sep, is_optional) =>
460+
tt_delim(tts) => tt_delim(@fold_tts(*tts, fld)),
461+
tt_seq(span, pattern, ref sep, is_optional) =>
462462
tt_seq(span,
463-
@mut fold_tts(**pattern, fld),
463+
@fold_tts(*pattern, fld),
464464
sep.as_ref().map(|tok|maybe_fold_ident(tok,fld)),
465465
is_optional),
466466
tt_nonterminal(sp,ref ident) =>

trunk/src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2112,7 +2112,7 @@ impl Parser {
21122112
};
21132113
tt_seq(
21142114
mk_sp(sp.lo, p.span.hi),
2115-
@mut seq,
2115+
@seq,
21162116
s,
21172117
z
21182118
)
@@ -2157,7 +2157,7 @@ impl Parser {
21572157
result.push(parse_any_tt_tok(self));
21582158
self.open_braces.pop();
21592159

2160-
tt_delim(@mut result)
2160+
tt_delim(@result)
21612161
}
21622162
_ => parse_non_delim_tt_tok(self)
21632163
}

0 commit comments

Comments
 (0)