Skip to content

Commit fba74f1

Browse files
committed
---
yaml --- r: 139349 b: refs/heads/try2 c: aa67def h: refs/heads/master i: 139347: 655d286 v: v3
1 parent 917d3fd commit fba74f1

Some content is hidden

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

65 files changed

+155
-728
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ refs/heads/snap-stage3: 78a7676898d9f80ab540c6df5d4c9ce35bb50463
55
refs/heads/try: 519addf6277dbafccbb4159db4b710c37eaa2ec5
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
8-
refs/heads/try2: 2a74fda316f5c4b31d3582fd1cf7b6c04c178557
8+
refs/heads/try2: aa67deff3303a14fa43e5e4693338c0b9f409e9d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,6 @@ fn get_self_ty(item: ebml::Doc) -> ast::self_ty_ {
630630
let self_ty_kind = string[0];
631631
match self_ty_kind as char {
632632
's' => { return ast::sty_static; }
633-
'r' => { return ast::sty_by_ref; }
634633
'v' => { return ast::sty_value; }
635634
'@' => { return ast::sty_box(get_mutability(string[1])); }
636635
'~' => { return ast::sty_uniq(get_mutability(string[1])); }

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

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -410,9 +410,6 @@ fn encode_self_type(ebml_w: writer::Encoder, self_type: ast::self_ty_) {
410410
sty_static => {
411411
ebml_w.writer.write(&[ 's' as u8 ]);
412412
}
413-
sty_by_ref => {
414-
ebml_w.writer.write(&[ 'r' as u8 ]);
415-
}
416413
sty_value => {
417414
ebml_w.writer.write(&[ 'v' as u8 ]);
418415
}

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ use core::vec;
2424
use syntax::ast;
2525
use syntax::ast::*;
2626
use syntax::codemap::{respan, dummy_sp};
27-
use syntax::opt_vec;
2827

2928
// Compact string representation for ty::t values. API ty_str &
3029
// parse_from_str. Extra parameters are for converting to/from def_ids in the
@@ -480,9 +479,7 @@ fn parse_sig(st: @mut PState, conv: conv_did) -> ty::FnSig {
480479
}
481480
st.pos += 1u; // eat the ']'
482481
let ret_ty = parse_ty(st, conv);
483-
ty::FnSig {bound_lifetime_names: opt_vec::Empty, // FIXME(#4846)
484-
inputs: inputs,
485-
output: ret_ty}
482+
ty::FnSig {inputs: inputs, output: ret_ty}
486483
}
487484
488485
// Rust metadata parsing

branches/try2/src/librustc/middle/borrowck/gather_loans.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -180,21 +180,6 @@ fn req_loans_in_expr(ex: @ast::expr,
180180
}
181181
}
182182

183-
match self.bccx.method_map.find(&ex.id) {
184-
Some(ref method_map_entry) => {
185-
match (*method_map_entry).explicit_self {
186-
ast::sty_by_ref => {
187-
let rcvr_cmt = self.bccx.cat_expr(rcvr);
188-
self.guarantee_valid(rcvr_cmt, m_imm, scope_r);
189-
}
190-
_ => {} // Nothing to do.
191-
}
192-
}
193-
None => {
194-
self.tcx().sess.span_bug(ex.span, ~"no method map entry");
195-
}
196-
}
197-
198183
visit::visit_expr(ex, self, vt);
199184
}
200185

branches/try2/src/librustc/middle/liveness.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -467,11 +467,6 @@ fn visit_fn(fk: &visit::fn_kind,
467467
match *fk {
468468
fk_method(_, _, method) => {
469469
match method.self_ty.node {
470-
sty_by_ref => {
471-
fn_maps.add_variable(Arg(method.self_id,
472-
special_idents::self_,
473-
by_ref));
474-
}
475470
sty_value | sty_region(*) | sty_box(_) | sty_uniq(_) => {
476471
fn_maps.add_variable(Arg(method.self_id,
477472
special_idents::self_,

branches/try2/src/librustc/middle/moves.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -737,20 +737,7 @@ pub impl VisitContext {
737737
receiver_expr: @expr,
738738
visitor: vt<VisitContext>)
739739
{
740-
let callee_mode = match self.method_map.find(&expr_id) {
741-
Some(ref method_map_entry) => {
742-
match method_map_entry.explicit_self {
743-
sty_by_ref => by_ref,
744-
_ => by_copy
745-
}
746-
}
747-
None => {
748-
self.tcx.sess.span_bug(
749-
span,
750-
~"no method map entry");
751-
}
752-
};
753-
self.use_fn_arg(callee_mode, receiver_expr, visitor);
740+
self.use_fn_arg(by_copy, receiver_expr, visitor);
754741
}
755742

756743
fn use_fn_args(&self,

branches/try2/src/librustc/middle/resolve.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ use syntax::ast::{named_field, ne, neg, node_id, pat, pat_enum, pat_ident};
5050
use syntax::ast::{path, pat_box, pat_lit, pat_range, pat_struct};
5151
use syntax::ast::{pat_tup, pat_uniq, pat_wild, prim_ty, private, provided};
5252
use syntax::ast::{public, required, rem, self_ty_, shl, shr, stmt_decl};
53-
use syntax::ast::{struct_dtor, struct_field, struct_variant_kind, sty_by_ref};
53+
use syntax::ast::{struct_dtor, struct_field, struct_variant_kind};
5454
use syntax::ast::{sty_static, subtract, trait_ref, tuple_variant_kind, Ty};
5555
use syntax::ast::{ty_bool, ty_char, ty_f, ty_f32, ty_f64, ty_float, ty_i};
5656
use syntax::ast::{ty_i16, ty_i32, ty_i64, ty_i8, ty_int, TyParam, ty_path};
@@ -3792,7 +3792,6 @@ pub impl Resolver {
37923792
// we only have self ty if it is a non static method
37933793
let self_binding = match method.self_ty.node {
37943794
sty_static => { NoSelfBinding }
3795-
sty_by_ref => { HasSelfBinding(method.self_id, true) }
37963795
_ => { HasSelfBinding(method.self_id, false) }
37973796
};
37983797

branches/try2/src/librustc/middle/trans/foreign.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ use util::ppaux::ty_to_str;
4040
use syntax::codemap::span;
4141
use syntax::{ast, ast_util};
4242
use syntax::{attr, ast_map};
43-
use syntax::opt_vec;
4443
use syntax::parse::token::special_idents;
4544

4645
fn abi_info(arch: session::arch) -> @cabi::ABIInfo {
@@ -616,8 +615,7 @@ pub fn trans_intrinsic(ccx: @CrateContext,
616615
sigil: ast::BorrowedSigil,
617616
onceness: ast::Many,
618617
region: ty::re_bound(ty::br_anon(0)),
619-
sig: FnSig {bound_lifetime_names: opt_vec::Empty,
620-
inputs: ~[arg {mode: ast::expl(ast::by_copy),
618+
sig: FnSig {inputs: ~[arg {mode: ast::expl(ast::by_copy),
621619
ty: star_u8}],
622620
output: ty::mk_nil(bcx.tcx())}
623621
});

branches/try2/src/librustc/middle/trans/meth.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ pub fn trans_trait_callee(bcx: block,
596596
597597
let llpair = match explicit_self {
598598
ast::sty_region(*) => Load(bcx, llpair),
599-
ast::sty_static | ast::sty_by_ref | ast::sty_value |
599+
ast::sty_static | ast::sty_value |
600600
ast::sty_box(_) | ast::sty_uniq(_) => llpair
601601
};
602602
@@ -645,21 +645,6 @@ pub fn trans_trait_callee_from_llval(bcx: block,
645645
ast::sty_static => {
646646
bcx.tcx().sess.bug(~"shouldn't see static method here");
647647
}
648-
ast::sty_by_ref => {
649-
// We need to pass a pointer to a pointer to the payload.
650-
match store {
651-
ty::BoxTraitStore |
652-
ty::BareTraitStore |
653-
ty::UniqTraitStore => {
654-
llself = GEPi(bcx, llbox, [0u, abi::box_field_body]);
655-
}
656-
ty::RegionTraitStore(_) => {
657-
llself = llbox;
658-
}
659-
}
660-
661-
self_mode = ast::by_ref;
662-
}
663648
ast::sty_value => {
664649
bcx.tcx().sess.bug(~"methods with by-value self should not be \
665650
called on objects");

branches/try2/src/librustc/middle/trans/monomorphize.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ use syntax::ast;
3737
use syntax::ast_map;
3838
use syntax::ast_map::{path, path_mod, path_name};
3939
use syntax::ast_util::local_def;
40-
use syntax::opt_vec;
4140
use syntax::parse::token::special_idents;
4241

4342
pub fn monomorphic_fn(ccx: @CrateContext,
@@ -283,8 +282,7 @@ pub fn normalize_for_monomorphization(tcx: ty::ctxt,
283282
ty::BareFnTy {
284283
purity: ast::impure_fn,
285284
abi: ast::RustAbi,
286-
sig: FnSig {bound_lifetime_names: opt_vec::Empty,
287-
inputs: ~[],
285+
sig: FnSig {inputs: ~[],
288286
output: ty::mk_nil(tcx)}}))
289287
}
290288
ty::ty_closure(ref fty) => {
@@ -318,8 +316,7 @@ pub fn normalize_for_monomorphization(tcx: ty::ctxt,
318316
sigil: sigil,
319317
onceness: ast::Many,
320318
region: ty::re_static,
321-
sig: ty::FnSig {bound_lifetime_names: opt_vec::Empty,
322-
inputs: ~[],
319+
sig: ty::FnSig {inputs: ~[],
323320
output: ty::mk_nil(tcx)}})
324321
}
325322
}

branches/try2/src/librustc/middle/ty.rs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,6 @@ use syntax::codemap::span;
4545
use syntax::codemap;
4646
use syntax::print::pprust;
4747
use syntax::{ast, ast_map};
48-
use syntax::opt_vec::OptVec;
49-
use syntax::opt_vec;
5048
use syntax;
5149

5250
// Data types
@@ -378,12 +376,10 @@ pub struct ClosureTy {
378376
* Signature of a function type, which I have arbitrarily
379377
* decided to use to refer to the input/output types.
380378
*
381-
* - `lifetimes` is the list of region names bound in this fn.
382379
* - `inputs` is the list of arguments and their modes.
383380
* - `output` is the return type. */
384381
#[deriving(Eq)]
385382
pub struct FnSig {
386-
bound_lifetime_names: OptVec<ast::ident>,
387383
inputs: ~[arg],
388384
output: t
389385
}
@@ -1066,8 +1062,7 @@ pub fn mk_ctor_fn(cx: ctxt, input_tys: &[ty::t], output: ty::t) -> t {
10661062
BareFnTy {
10671063
purity: ast::pure_fn,
10681064
abi: ast::RustAbi,
1069-
sig: FnSig {bound_lifetime_names: opt_vec::Empty,
1070-
inputs: input_args,
1065+
sig: FnSig {inputs: input_args,
10711066
output: output}})
10721067
}
10731068

@@ -1208,7 +1203,6 @@ pub fn fold_sig(sig: &FnSig, fldop: &fn(t) -> t) -> FnSig {
12081203
};
12091204

12101205
FnSig {
1211-
bound_lifetime_names: copy sig.bound_lifetime_names,
12121206
inputs: args,
12131207
output: fldop(sig.output)
12141208
}

0 commit comments

Comments
 (0)