Skip to content

Commit ef44a5d

Browse files
committed
---
yaml --- r: 158635 b: refs/heads/try c: f8795b2 h: refs/heads/master i: 158633: ee5f427 158631: 694e995 v: v3
1 parent 881997c commit ef44a5d

Some content is hidden

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

75 files changed

+1085
-1087
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: a0a7ab461283322215f0343cd2b5e66fc19a7bd5
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 1b2ad7831f1745bf4a4709a1fa1772afb47c933c
5-
refs/heads/try: 868b1284c0b0cc70b877665dfc54a30a4656347f
5+
refs/heads/try: f8795b20b326f68b32f74e90fb394c56c3199e19
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc/back/link.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use metadata::common::LinkMeta;
2222
use metadata::{encoder, cstore, filesearch, csearch, creader};
2323
use middle::trans::context::CrateContext;
2424
use middle::trans::common::gensym_name;
25-
use middle::ty;
25+
use middle::ty::{mod, Ty};
2626
use util::common::time;
2727
use util::ppaux;
2828
use util::sha2::{Digest, Sha256};
@@ -198,7 +198,7 @@ fn truncated_hash_result(symbol_hasher: &mut Sha256) -> String {
198198
// This calculates STH for a symbol, as defined above
199199
fn symbol_hash(tcx: &ty::ctxt,
200200
symbol_hasher: &mut Sha256,
201-
t: ty::t,
201+
t: Ty,
202202
link_meta: &LinkMeta)
203203
-> String {
204204
// NB: do *not* use abbrevs here as we want the symbol names
@@ -219,7 +219,7 @@ fn symbol_hash(tcx: &ty::ctxt,
219219
hash
220220
}
221221

222-
fn get_symbol_hash(ccx: &CrateContext, t: ty::t) -> String {
222+
fn get_symbol_hash(ccx: &CrateContext, t: Ty) -> String {
223223
match ccx.type_hashcodes().borrow().find(&t) {
224224
Some(h) => return h.to_string(),
225225
None => {}
@@ -321,7 +321,7 @@ pub fn exported_name(path: PathElems, hash: &str) -> String {
321321
}
322322

323323
pub fn mangle_exported_name(ccx: &CrateContext, path: PathElems,
324-
t: ty::t, id: ast::NodeId) -> String {
324+
t: Ty, id: ast::NodeId) -> String {
325325
let mut hash = get_symbol_hash(ccx, t);
326326

327327
// Paths can be completely identical for different nodes,
@@ -346,7 +346,7 @@ pub fn mangle_exported_name(ccx: &CrateContext, path: PathElems,
346346
}
347347

348348
pub fn mangle_internal_name_by_type_and_seq(ccx: &CrateContext,
349-
t: ty::t,
349+
t: Ty,
350350
name: &str) -> String {
351351
let s = ppaux::ty_to_string(ccx.tcx(), t);
352352
let path = [PathName(token::intern(s.as_slice())),

branches/try/src/librustc/lint/builtin.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,10 @@
2727
2828
use metadata::csearch;
2929
use middle::def::*;
30+
use middle::ty::{mod, Ty};
3031
use middle::typeck::astconv::ast_ty_to_ty;
31-
use middle::typeck::infer;
32-
use middle::{typeck, ty, def, pat_util, stability};
32+
use middle::typeck::{mod, infer};
33+
use middle::{def, pat_util, stability};
3334
use middle::const_eval::{eval_const_expr_partial, const_int, const_uint};
3435
use util::ppaux::{ty_to_string};
3536
use util::nodemap::NodeSet;
@@ -470,7 +471,7 @@ declare_lint!(BOX_POINTERS, Allow,
470471
pub struct BoxPointers;
471472

472473
impl BoxPointers {
473-
fn check_heap_type(&self, cx: &Context, span: Span, ty: ty::t) {
474+
fn check_heap_type(&self, cx: &Context, span: Span, ty: Ty) {
474475
let mut n_uniq = 0i;
475476
ty::fold_ty(cx.tcx, ty, |t| {
476477
match ty::get(t).sty {

branches/try/src/librustc/lint/context.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
2727
use middle::privacy::ExportedItems;
2828
use middle::subst;
29-
use middle::ty;
29+
use middle::ty::{mod, Ty};
3030
use middle::typeck::astconv::AstConv;
3131
use middle::typeck::infer;
3232
use driver::session::Session;
@@ -553,22 +553,22 @@ impl<'a, 'tcx> AstConv<'tcx> for Context<'a, 'tcx>{
553553
ty::lookup_trait_def(self.tcx, id)
554554
}
555555

556-
fn ty_infer(&self, _span: Span) -> ty::t {
556+
fn ty_infer(&self, _span: Span) -> Ty {
557557
infer::new_infer_ctxt(self.tcx).next_ty_var()
558558
}
559559

560-
fn associated_types_of_trait_are_valid(&self, _: ty::t, _: ast::DefId)
560+
fn associated_types_of_trait_are_valid(&self, _: Ty, _: ast::DefId)
561561
-> bool {
562562
// FIXME(pcwalton): This is wrong.
563563
true
564564
}
565565

566566
fn associated_type_binding(&self,
567567
_: Span,
568-
_: Option<ty::t>,
568+
_: Option<Ty>,
569569
trait_id: ast::DefId,
570570
associated_type_id: ast::DefId)
571-
-> ty::t {
571+
-> Ty {
572572
// FIXME(pcwalton): This is wrong.
573573
let trait_def = self.get_trait_def(trait_id);
574574
let index = ty::associated_type_parameter_index(self.tcx,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ use middle::lang_items;
2626
use middle::resolve::{TraitItemKind, TypeTraitItemKind};
2727
use middle::subst;
2828
use middle::ty::{ImplContainer, TraitContainer};
29-
use middle::ty;
29+
use middle::ty::{mod, Ty};
3030
use middle::typeck;
3131
use middle::astencode::vtable_decoder_helpers;
3232

@@ -221,7 +221,7 @@ fn variant_disr_val(d: rbml::Doc) -> Option<ty::Disr> {
221221
})
222222
}
223223

224-
fn doc_type(doc: rbml::Doc, tcx: &ty::ctxt, cdata: Cmd) -> ty::t {
224+
fn doc_type(doc: rbml::Doc, tcx: &ty::ctxt, cdata: Cmd) -> Ty {
225225
let tp = reader::get_doc(doc, tag_items_data_item_type);
226226
parse_ty_data(tp.data, cdata.cnum, tp.start, tcx,
227227
|_, did| translate_def_id(cdata, did))
@@ -234,7 +234,7 @@ fn doc_method_fty(doc: rbml::Doc, tcx: &ty::ctxt, cdata: Cmd) -> ty::BareFnTy {
234234
}
235235

236236
pub fn item_type(_item_id: ast::DefId, item: rbml::Doc,
237-
tcx: &ty::ctxt, cdata: Cmd) -> ty::t {
237+
tcx: &ty::ctxt, cdata: Cmd) -> Ty {
238238
doc_type(item, tcx, cdata)
239239
}
240240

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use metadata::cstore;
2020
use metadata::decoder;
2121
use metadata::tyencode;
2222
use middle::ty::{lookup_item_type};
23-
use middle::ty;
23+
use middle::ty::{mod, Ty};
2424
use middle::stability;
2525
use middle;
2626
use util::nodemap::{NodeMap, NodeSet};
@@ -167,7 +167,7 @@ pub fn write_closure_type(ecx: &EncodeContext,
167167

168168
pub fn write_type(ecx: &EncodeContext,
169169
rbml_w: &mut Encoder,
170-
typ: ty::t) {
170+
typ: Ty) {
171171
let ty_str_ctxt = &tyencode::ctxt {
172172
diag: ecx.diag,
173173
ds: def_to_string,
@@ -218,7 +218,7 @@ fn encode_bounds(rbml_w: &mut Encoder,
218218

219219
fn encode_type(ecx: &EncodeContext,
220220
rbml_w: &mut Encoder,
221-
typ: ty::t) {
221+
typ: Ty) {
222222
rbml_w.start_tag(tag_items_data_item_type);
223223
write_type(ecx, rbml_w, typ);
224224
rbml_w.end_tag();
@@ -2162,7 +2162,7 @@ fn encode_metadata_inner(wr: &mut SeekableMemWriter,
21622162
}
21632163

21642164
// Get the encoded string for a type
2165-
pub fn encoded_ty(tcx: &ty::ctxt, t: ty::t) -> String {
2165+
pub fn encoded_ty(tcx: &ty::ctxt, t: Ty) -> String {
21662166
let mut wr = SeekableMemWriter::new();
21672167
tyencode::enc_ty(&mut wr, &tyencode::ctxt {
21682168
diag: tcx.sess.diagnostic(),

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
use middle::subst;
2020
use middle::subst::VecPerParamSpace;
21-
use middle::ty;
21+
use middle::ty::{mod, Ty};
2222

2323
use std::rc::Rc;
2424
use std::str;
@@ -27,7 +27,7 @@ use syntax::abi;
2727
use syntax::ast;
2828
use syntax::parse::token;
2929

30-
// Compact string representation for ty::t values. API ty_str &
30+
// Compact string representation for Ty values. API ty_str &
3131
// parse_from_str. Extra parameters are for converting to/from def_ids in the
3232
// data buffer. Whatever format you choose should not contain pipe characters.
3333

@@ -148,7 +148,7 @@ pub fn parse_ty_closure_data(data: &[u8],
148148
}
149149

150150
pub fn parse_ty_data(data: &[u8], crate_num: ast::CrateNum, pos: uint, tcx: &ty::ctxt,
151-
conv: conv_did) -> ty::t {
151+
conv: conv_did) -> Ty {
152152
debug!("parse_ty_data {}", data_log_string(data, pos));
153153
let mut st = parse_state_from_data(data, crate_num, pos, tcx);
154154
parse_ty(&mut st, conv)
@@ -357,7 +357,7 @@ fn parse_trait_ref(st: &mut PState, conv: conv_did) -> ty::TraitRef {
357357
ty::TraitRef {def_id: def, substs: substs}
358358
}
359359

360-
fn parse_ty(st: &mut PState, conv: conv_did) -> ty::t {
360+
fn parse_ty(st: &mut PState, conv: conv_did) -> Ty {
361361
match next(st) {
362362
'n' => return ty::mk_nil(),
363363
'b' => return ty::mk_bool(),

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ use std::collections::HashMap;
1919
use middle::subst;
2020
use middle::subst::VecPerParamSpace;
2121
use middle::ty::ParamTy;
22-
use middle::ty;
22+
use middle::ty::{mod, Ty};
2323

2424
use syntax::abi::Abi;
2525
use syntax::ast;
@@ -46,9 +46,9 @@ pub struct ty_abbrev {
4646
s: String
4747
}
4848

49-
pub type abbrev_map = RefCell<HashMap<ty::t, ty_abbrev>>;
49+
pub type abbrev_map = RefCell<HashMap<Ty, ty_abbrev>>;
5050

51-
pub fn enc_ty(w: &mut SeekableMemWriter, cx: &ctxt, t: ty::t) {
51+
pub fn enc_ty(w: &mut SeekableMemWriter, cx: &ctxt, t: Ty) {
5252
match cx.abbrevs.borrow_mut().find(&t) {
5353
Some(a) => { w.write(a.s.as_bytes()); return; }
5454
None => {}

branches/try/src/librustc/middle/astencode.rs

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ use metadata::tyencode;
2626
use middle::mem_categorization::Typer;
2727
use middle::subst;
2828
use middle::subst::VecPerParamSpace;
29-
use middle::typeck::{MethodCall, MethodCallee, MethodOrigin};
30-
use middle::{ty, typeck};
29+
use middle::typeck::{mod, MethodCall, MethodCallee, MethodOrigin};
30+
use middle::ty::{mod, Ty};
3131
use util::ppaux::ty_to_string;
3232

3333
use syntax::{ast, ast_map, ast_util, codemap, fold};
@@ -831,8 +831,8 @@ trait rbml_writer_helpers {
831831
fn emit_method_origin(&mut self,
832832
ecx: &e::EncodeContext,
833833
method_origin: &typeck::MethodOrigin);
834-
fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: ty::t);
835-
fn emit_tys(&mut self, ecx: &e::EncodeContext, tys: &[ty::t]);
834+
fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: Ty);
835+
fn emit_tys(&mut self, ecx: &e::EncodeContext, tys: &[Ty]);
836836
fn emit_type_param_def(&mut self,
837837
ecx: &e::EncodeContext,
838838
type_param_def: &ty::TypeParameterDef);
@@ -915,11 +915,11 @@ impl<'a> rbml_writer_helpers for Encoder<'a> {
915915
});
916916
}
917917

918-
fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: ty::t) {
918+
fn emit_ty(&mut self, ecx: &e::EncodeContext, ty: Ty) {
919919
self.emit_opaque(|this| Ok(e::write_type(ecx, this, ty)));
920920
}
921921

922-
fn emit_tys(&mut self, ecx: &e::EncodeContext, tys: &[ty::t]) {
922+
fn emit_tys(&mut self, ecx: &e::EncodeContext, tys: &[Ty]) {
923923
self.emit_from_vec(tys, |this, ty| Ok(this.emit_ty(ecx, *ty)));
924924
}
925925

@@ -1325,8 +1325,8 @@ impl<'a> doc_decoder_helpers for rbml::Doc<'a> {
13251325

13261326
trait rbml_decoder_decoder_helpers {
13271327
fn read_method_origin(&mut self, dcx: &DecodeContext) -> typeck::MethodOrigin;
1328-
fn read_ty(&mut self, dcx: &DecodeContext) -> ty::t;
1329-
fn read_tys(&mut self, dcx: &DecodeContext) -> Vec<ty::t>;
1328+
fn read_ty(&mut self, dcx: &DecodeContext) -> Ty;
1329+
fn read_tys(&mut self, dcx: &DecodeContext) -> Vec<Ty>;
13301330
fn read_trait_ref(&mut self, dcx: &DecodeContext) -> Rc<ty::TraitRef>;
13311331
fn read_type_param_def(&mut self, dcx: &DecodeContext)
13321332
-> ty::TypeParameterDef;
@@ -1349,18 +1349,18 @@ trait rbml_decoder_decoder_helpers {
13491349
// Versions of the type reading functions that don't need the full
13501350
// DecodeContext.
13511351
fn read_ty_nodcx(&mut self,
1352-
tcx: &ty::ctxt, cdata: &cstore::crate_metadata) -> ty::t;
1352+
tcx: &ty::ctxt, cdata: &cstore::crate_metadata) -> Ty;
13531353
fn read_tys_nodcx(&mut self,
13541354
tcx: &ty::ctxt,
1355-
cdata: &cstore::crate_metadata) -> Vec<ty::t>;
1355+
cdata: &cstore::crate_metadata) -> Vec<Ty>;
13561356
fn read_substs_nodcx(&mut self, tcx: &ty::ctxt,
13571357
cdata: &cstore::crate_metadata)
13581358
-> subst::Substs;
13591359
}
13601360

13611361
impl<'a> rbml_decoder_decoder_helpers for reader::Decoder<'a> {
13621362
fn read_ty_nodcx(&mut self,
1363-
tcx: &ty::ctxt, cdata: &cstore::crate_metadata) -> ty::t {
1363+
tcx: &ty::ctxt, cdata: &cstore::crate_metadata) -> Ty {
13641364
self.read_opaque(|_, doc| {
13651365
Ok(tydecode::parse_ty_data(
13661366
doc.data,
@@ -1373,7 +1373,7 @@ impl<'a> rbml_decoder_decoder_helpers for reader::Decoder<'a> {
13731373

13741374
fn read_tys_nodcx(&mut self,
13751375
tcx: &ty::ctxt,
1376-
cdata: &cstore::crate_metadata) -> Vec<ty::t> {
1376+
cdata: &cstore::crate_metadata) -> Vec<Ty> {
13771377
self.read_to_vec(|this| Ok(this.read_ty_nodcx(tcx, cdata)) )
13781378
.unwrap()
13791379
.into_iter()
@@ -1466,7 +1466,7 @@ impl<'a> rbml_decoder_decoder_helpers for reader::Decoder<'a> {
14661466
}
14671467

14681468

1469-
fn read_ty(&mut self, dcx: &DecodeContext) -> ty::t {
1469+
fn read_ty(&mut self, dcx: &DecodeContext) -> Ty {
14701470
// Note: regions types embed local node ids. In principle, we
14711471
// should translate these node ids into the new decode
14721472
// context. However, we do not bother, because region types
@@ -1494,7 +1494,7 @@ impl<'a> rbml_decoder_decoder_helpers for reader::Decoder<'a> {
14941494
}
14951495
}
14961496

1497-
fn read_tys(&mut self, dcx: &DecodeContext) -> Vec<ty::t> {
1497+
fn read_tys(&mut self, dcx: &DecodeContext) -> Vec<Ty> {
14981498
self.read_to_vec(|this| Ok(this.read_ty(dcx))).unwrap().into_iter().collect()
14991499
}
15001500

branches/try/src/librustc/middle/borrowck/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use middle::dataflow::BitwiseOperator;
1818
use middle::dataflow::DataFlowOperator;
1919
use middle::expr_use_visitor as euv;
2020
use middle::mem_categorization as mc;
21-
use middle::ty;
21+
use middle::ty::{mod, Ty};
2222
use util::ppaux::{note_and_explain_region, Repr, UserString};
2323

2424
use std::rc::Rc;
@@ -580,7 +580,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
580580
}
581581
}
582582

583-
fn move_suggestion(tcx: &ty::ctxt, ty: ty::t, default_msgs: (&'static str, &'static str))
583+
fn move_suggestion(tcx: &ty::ctxt, ty: Ty, default_msgs: (&'static str, &'static str))
584584
-> (&'static str, &'static str) {
585585
match ty::get(ty).sty {
586586
ty::ty_closure(box ty::ClosureTy {

0 commit comments

Comments
 (0)