Skip to content

Commit 99092d2

Browse files
committed
---
yaml --- r: 103590 b: refs/heads/try c: e5abe66 h: refs/heads/master v: v3
1 parent a596d50 commit 99092d2

File tree

143 files changed

+2346
-2526
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+2346
-2526
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 62f1d68439dcfd509eaca29887afa97f22938373
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 6e7f170fedd3c526a643c0b2d13863acd982be02
5-
refs/heads/try: a97642026c18a624ff6ea01075dd9550f8ed07ff
5+
refs/heads/try: e5abe669831a59c48faa85e88ed8859b6dc63f49
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c

branches/try/configure

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,6 @@ do
916916
LLVM_OPTS="$LLVM_OPTS --disable-terminfo"
917917
# Try to have LLVM pull in as few dependencies as possible (#9397)
918918
LLVM_OPTS="$LLVM_OPTS --disable-zlib --disable-libffi"
919-
LLVM_OPTS="$LLVM_OPTS --disable-compiler-version-checks"
920919

921920
# Use win32 native thread/lock apis instead of pthread wrapper.
922921
# (llvm's configure tries to find pthread first, so we have to disable it explicitly.)

branches/try/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
<keyword>f64</keyword>
8888
<keyword>char</keyword>
8989
<keyword>str</keyword>
90+
<keyword>Either</keyword>
9091
<keyword>Option</keyword>
9192
<keyword>Result</keyword>
9293
</context>
@@ -133,6 +134,8 @@
133134
<keyword>false</keyword>
134135
<keyword>Some</keyword>
135136
<keyword>None</keyword>
137+
<keyword>Left</keyword>
138+
<keyword>Right</keyword>
136139
<keyword>Ok</keyword>
137140
<keyword>Err</keyword>
138141
<keyword>Success</keyword>

branches/try/src/etc/generate-deriving-span-tests.py

Lines changed: 0 additions & 131 deletions
This file was deleted.

branches/try/src/etc/kate/rust.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
<item> float </item>
8787
<item> char </item>
8888
<item> str </item>
89+
<item> Either </item>
8990
<item> Option </item>
9091
<item> Result </item>
9192
<item> Self </item>
@@ -130,6 +131,8 @@
130131
<item> false </item>
131132
<item> Some </item>
132133
<item> None </item>
134+
<item> Left </item>
135+
<item> Right </item>
133136
<item> Ok </item>
134137
<item> Err </item>
135138
<item> Success </item>

branches/try/src/etc/vim/syntax/rust.vim

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ syn keyword rustType f64 i8 i16 i32 i64 str Self
4646
" to make it easy to update.
4747

4848
" Core operators {{{3
49+
syn keyword rustEnum Either
50+
syn keyword rustEnumVariant Left Right
4951
syn keyword rustTrait Sized
5052
syn keyword rustTrait Freeze Send
5153
syn keyword rustTrait Add Sub Mul Div Rem Neg Not
@@ -111,6 +113,7 @@ syn keyword rustSelf self
111113
syn keyword rustBoolean true false
112114

113115
syn keyword rustConstant Some None " option
116+
syn keyword rustConstant Left Right " either
114117
syn keyword rustConstant Ok Err " result
115118
syn keyword rustConstant Less Equal Greater " Ordering
116119

branches/try/src/libextra/test.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -895,7 +895,7 @@ pub fn run_test(force_ignore: bool,
895895
return;
896896
}
897897
StaticBenchFn(benchfn) => {
898-
let bs = ::test::bench::benchmark(|harness| benchfn(harness));
898+
let bs = ::test::bench::benchmark(benchfn);
899899
monitor_ch.send((desc, TrBench(bs)));
900900
return;
901901
}

branches/try/src/librustc/front/feature_gate.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
4646
("phase", Active),
4747
("macro_registrar", Active),
4848
("log_syntax", Active),
49-
("trace_macros", Active),
5049

5150
// These are used to test this portion of the compiler, they don't actually
5251
// mean anything
@@ -194,10 +193,6 @@ impl Visitor<()> for Context {
194193
self.gate_feature("log_syntax", path.span, "`log_syntax!` is not \
195194
stable enough for use and is subject to change");
196195
}
197-
else if path.segments.last().unwrap().identifier == self.sess.ident_of("trace_macros") {
198-
self.gate_feature("trace_macros", path.span, "`trace_macros` is not \
199-
stable enough for use and is subject to change");
200-
}
201196
}
202197

203198
fn visit_ty(&mut self, t: &ast::Ty, _: ()) {

branches/try/src/librustc/metadata/common.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -176,23 +176,24 @@ pub static tag_link_args_arg: uint = 0x7a;
176176

177177
pub static tag_item_method_tps: uint = 0x7b;
178178
pub static tag_item_method_fty: uint = 0x7c;
179+
pub static tag_item_method_transformed_self_ty: uint = 0x7d;
179180

180-
pub static tag_mod_child: uint = 0x7d;
181-
pub static tag_misc_info: uint = 0x7e;
182-
pub static tag_misc_info_crate_items: uint = 0x7f;
181+
pub static tag_mod_child: uint = 0x7e;
182+
pub static tag_misc_info: uint = 0x7f;
183+
pub static tag_misc_info_crate_items: uint = 0x80;
183184

184-
pub static tag_item_method_provided_source: uint = 0x80;
185-
pub static tag_item_impl_vtables: uint = 0x81;
185+
pub static tag_item_method_provided_source: uint = 0x81;
186+
pub static tag_item_impl_vtables: uint = 0x82;
186187

187-
pub static tag_impls: uint = 0x82;
188-
pub static tag_impls_impl: uint = 0x83;
188+
pub static tag_impls: uint = 0x83;
189+
pub static tag_impls_impl: uint = 0x84;
189190

190-
pub static tag_items_data_item_inherent_impl: uint = 0x84;
191-
pub static tag_items_data_item_extension_impl: uint = 0x85;
191+
pub static tag_items_data_item_inherent_impl: uint = 0x85;
192+
pub static tag_items_data_item_extension_impl: uint = 0x86;
192193

193-
pub static tag_path_elem_pretty_name: uint = 0x86;
194-
pub static tag_path_elem_pretty_name_ident: uint = 0x87;
195-
pub static tag_path_elem_pretty_name_extra: uint = 0x88;
194+
pub static tag_path_elem_pretty_name: uint = 0x87;
195+
pub static tag_path_elem_pretty_name_ident: uint = 0x88;
196+
pub static tag_path_elem_pretty_name_extra: uint = 0x89;
196197

197198
pub static tag_region_param_def: uint = 0x100;
198199
pub static tag_region_param_def_ident: uint = 0x101;

branches/try/src/librustc/metadata/decoder.rs

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,16 @@ fn doc_method_fty(doc: ebml::Doc, tcx: ty::ctxt, cdata: Cmd) -> ty::BareFnTy {
227227
|_, did| translate_def_id(cdata, did))
228228
}
229229

230+
fn doc_transformed_self_ty(doc: ebml::Doc,
231+
tcx: ty::ctxt,
232+
cdata: Cmd) -> Option<ty::t>
233+
{
234+
reader::maybe_get_doc(doc, tag_item_method_transformed_self_ty).map(|tp| {
235+
parse_ty_data(tp.data, cdata.cnum, tp.start, tcx,
236+
|_, did| translate_def_id(cdata, did))
237+
})
238+
}
239+
230240
pub fn item_type(_item_id: ast::DefId, item: ebml::Doc,
231241
tcx: ty::ctxt, cdata: Cmd) -> ty::t {
232242
doc_type(item, tcx, cdata)
@@ -771,9 +781,9 @@ fn get_explicit_self(item: ebml::Doc) -> ast::ExplicitSelf_ {
771781
let explicit_self_kind = string[0];
772782
match explicit_self_kind as char {
773783
's' => ast::SelfStatic,
774-
'v' => ast::SelfValue,
784+
'v' => ast::SelfValue(get_mutability(string[1])),
775785
'@' => ast::SelfBox,
776-
'~' => ast::SelfUniq,
786+
'~' => ast::SelfUniq(get_mutability(string[1])),
777787
// FIXME(#4846) expl. region
778788
'&' => ast::SelfRegion(None, get_mutability(string[1])),
779789
_ => fail!("unknown self type code: `{}`", explicit_self_kind as char)
@@ -837,6 +847,7 @@ pub fn get_method(intr: @IdentInterner, cdata: Cmd, id: ast::NodeId,
837847
let type_param_defs = item_ty_param_defs(method_doc, tcx, cdata,
838848
tag_item_method_tps);
839849
let rp_defs = item_region_param_defs(method_doc, tcx, cdata);
850+
let transformed_self_ty = doc_transformed_self_ty(method_doc, tcx, cdata);
840851
let fty = doc_method_fty(method_doc, tcx, cdata);
841852
let vis = item_visibility(method_doc);
842853
let explicit_self = get_explicit_self(method_doc);
@@ -848,6 +859,7 @@ pub fn get_method(intr: @IdentInterner, cdata: Cmd, id: ast::NodeId,
848859
type_param_defs: type_param_defs,
849860
region_param_defs: rp_defs,
850861
},
862+
transformed_self_ty,
851863
fty,
852864
explicit_self,
853865
vis,

branches/try/src/librustc/metadata/encoder.rs

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,16 @@ fn encode_type(ecx: &EncodeContext,
261261
ebml_w.end_tag();
262262
}
263263

264+
fn encode_transformed_self_ty(ecx: &EncodeContext,
265+
ebml_w: &mut writer::Encoder,
266+
opt_typ: Option<ty::t>) {
267+
for &typ in opt_typ.iter() {
268+
ebml_w.start_tag(tag_item_method_transformed_self_ty);
269+
write_type(ecx, ebml_w, typ);
270+
ebml_w.end_tag();
271+
}
272+
}
273+
264274
fn encode_method_fty(ecx: &EncodeContext,
265275
ebml_w: &mut writer::Encoder,
266276
typ: &ty::BareFnTy) {
@@ -669,13 +679,23 @@ fn encode_explicit_self(ebml_w: &mut writer::Encoder, explicit_self: ast::Explic
669679

670680
// Encode the base self type.
671681
match explicit_self {
672-
SelfStatic => ebml_w.writer.write(&[ 's' as u8 ]),
673-
SelfValue => ebml_w.writer.write(&[ 'v' as u8 ]),
674-
SelfBox => ebml_w.writer.write(&[ '@' as u8 ]),
675-
SelfUniq => ebml_w.writer.write(&[ '~' as u8 ]),
682+
SelfStatic => {
683+
ebml_w.writer.write(&[ 's' as u8 ]);
684+
}
685+
SelfValue(m) => {
686+
ebml_w.writer.write(&[ 'v' as u8 ]);
687+
encode_mutability(ebml_w, m);
688+
}
676689
SelfRegion(_, m) => {
677690
// FIXME(#4846) encode custom lifetime
678-
ebml_w.writer.write(&['&' as u8]);
691+
ebml_w.writer.write(&[ '&' as u8 ]);
692+
encode_mutability(ebml_w, m);
693+
}
694+
SelfBox => {
695+
ebml_w.writer.write(&[ '@' as u8 ]);
696+
}
697+
SelfUniq(m) => {
698+
ebml_w.writer.write(&[ '~' as u8 ]);
679699
encode_mutability(ebml_w, m);
680700
}
681701
}
@@ -787,6 +807,7 @@ fn encode_method_ty_fields(ecx: &EncodeContext,
787807
encode_ty_type_param_defs(ebml_w, ecx,
788808
method_ty.generics.type_param_defs,
789809
tag_item_method_tps);
810+
encode_transformed_self_ty(ecx, ebml_w, method_ty.transformed_self_ty);
790811
encode_method_fty(ecx, ebml_w, &method_ty.fty);
791812
encode_visibility(ebml_w, method_ty.vis);
792813
encode_explicit_self(ebml_w, method_ty.explicit_self);

branches/try/src/librustc/metadata/tydecode.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
374374
return ty::mk_bare_fn(st.tcx, parse_bare_fn_ty(st, |x,y| conv(x,y)));
375375
}
376376
'Y' => return ty::mk_type(st.tcx),
377+
'C' => {
378+
let sigil = parse_sigil(st);
379+
return ty::mk_opaque_closure_ptr(st.tcx, sigil);
380+
}
377381
'#' => {
378382
let pos = parse_hex(st);
379383
assert_eq!(next(st), ':');

branches/try/src/librustc/metadata/tyencode.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,10 @@ fn enc_sty(w: &mut MemWriter, cx: @ctxt, st: &ty::sty) {
327327
mywrite!(w, "s{}|", (cx.ds)(did));
328328
}
329329
ty::ty_type => mywrite!(w, "Y"),
330+
ty::ty_opaque_closure_ptr(p) => {
331+
mywrite!(w, "C&");
332+
enc_sigil(w, p);
333+
}
330334
ty::ty_struct(def, ref substs) => {
331335
mywrite!(w, "a[{}|", (cx.ds)(def));
332336
enc_substs(w, cx, substs);

0 commit comments

Comments
 (0)