Skip to content

Commit 89ee7d5

Browse files
committed
---
yaml --- r: 89907 b: refs/heads/master c: f4c222f h: refs/heads/master i: 89905: 561422c 89903: 59b5426 v: v3
1 parent cd95e1b commit 89ee7d5

File tree

28 files changed

+53
-187
lines changed

28 files changed

+53
-187
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: 7fc3e82aaeb15c067a1eed914032ba21a7763557
2+
refs/heads/master: f4c222f7a3f21fd3fdc5df28f344988c103d17fa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: a6d3e57dca68fde4effdda3e4ae2887aa535fcd6
55
refs/heads/try: b160761e35efcd1207112b3b782c06633cf441a8

trunk/src/libextra/time.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ pub mod rustrt {
2121
use super::Tm;
2222

2323
extern {
24-
pub fn get_time(sec: &mut i64, nsec: &mut i32);
25-
pub fn precise_time_ns(ns: &mut u64);
24+
pub fn rust_get_time(sec: &mut i64, nsec: &mut i32);
25+
pub fn rust_precise_time_ns(ns: &mut u64);
2626
pub fn rust_tzset();
2727
pub fn rust_gmtime(sec: i64, nsec: i32, result: &mut Tm);
2828
pub fn rust_localtime(sec: i64, nsec: i32, result: &mut Tm);
@@ -66,7 +66,7 @@ pub fn get_time() -> Timespec {
6666
unsafe {
6767
let mut sec = 0i64;
6868
let mut nsec = 0i32;
69-
rustrt::get_time(&mut sec, &mut nsec);
69+
rustrt::rust_get_time(&mut sec, &mut nsec);
7070
return Timespec::new(sec, nsec);
7171
}
7272
}
@@ -79,7 +79,7 @@ pub fn get_time() -> Timespec {
7979
pub fn precise_time_ns() -> u64 {
8080
unsafe {
8181
let mut ns = 0u64;
82-
rustrt::precise_time_ns(&mut ns);
82+
rustrt::rust_precise_time_ns(&mut ns);
8383
ns
8484
}
8585
}

trunk/src/librustc/middle/cfg/construct.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ impl CFGBuilder {
9797
ast::PatEnum(_, None) |
9898
ast::PatLit(*) |
9999
ast::PatRange(*) |
100-
ast::PatWild | ast::PatWildMulti => {
100+
ast::PatWild => {
101101
self.add_node(pat.id, [pred])
102102
}
103103

trunk/src/librustc/middle/check_match.rs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ fn is_useful_specialized(cx: &MatchCheckCtxt,
333333
fn pat_ctor_id(cx: &MatchCheckCtxt, p: @Pat) -> Option<ctor> {
334334
let pat = raw_pat(p);
335335
match pat.node {
336-
PatWild | PatWildMulti => { None }
336+
PatWild => { None }
337337
PatIdent(_, _, _) | PatEnum(_, _) => {
338338
match cx.tcx.def_map.find(&pat.id) {
339339
Some(&DefVariant(_, id, _)) => Some(variant(id)),
@@ -369,7 +369,7 @@ fn pat_ctor_id(cx: &MatchCheckCtxt, p: @Pat) -> Option<ctor> {
369369
fn is_wild(cx: &MatchCheckCtxt, p: @Pat) -> bool {
370370
let pat = raw_pat(p);
371371
match pat.node {
372-
PatWild | PatWildMulti => { true }
372+
PatWild => { true }
373373
PatIdent(_, _, _) => {
374374
match cx.tcx.def_map.find(&pat.id) {
375375
Some(&DefVariant(_, _, _)) | Some(&DefStatic(*)) => { false }
@@ -532,10 +532,6 @@ fn wild() -> @Pat {
532532
@Pat {id: 0, node: PatWild, span: dummy_sp()}
533533
}
534534

535-
fn wild_multi() -> @Pat {
536-
@Pat {id: 0, node: PatWildMulti, span: dummy_sp()}
537-
}
538-
539535
fn specialize(cx: &MatchCheckCtxt,
540536
r: &[@Pat],
541537
ctor_id: &ctor,
@@ -550,9 +546,6 @@ fn specialize(cx: &MatchCheckCtxt,
550546
PatWild => {
551547
Some(vec::append(vec::from_elem(arity, wild()), r.tail()))
552548
}
553-
PatWildMulti => {
554-
Some(vec::append(vec::from_elem(arity, wild_multi()), r.tail()))
555-
}
556549
PatIdent(_, _, _) => {
557550
match cx.tcx.def_map.find(&pat_id) {
558551
Some(&DefVariant(_, id, _)) => {
@@ -856,7 +849,7 @@ fn is_refutable(cx: &MatchCheckCtxt, pat: &Pat) -> bool {
856849
PatIdent(_, _, Some(sub)) => {
857850
is_refutable(cx, sub)
858851
}
859-
PatWild | PatWildMulti | PatIdent(_, _, None) => { false }
852+
PatWild | PatIdent(_, _, None) => { false }
860853
PatLit(@Expr {node: ExprLit(@Spanned { node: lit_nil, _}), _}) => {
861854
// "()"
862855
false

trunk/src/librustc/middle/mem_categorization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -876,7 +876,7 @@ impl mem_categorization_ctxt {
876876
op(cmt, pat);
877877

878878
match pat.node {
879-
ast::PatWild | ast::PatWildMulti => {
879+
ast::PatWild => {
880880
// _
881881
}
882882

trunk/src/librustc/middle/pat_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ pub fn pat_is_binding(dm: resolve::DefMap, pat: @Pat) -> bool {
6565
pub fn pat_is_binding_or_wild(dm: resolve::DefMap, pat: @Pat) -> bool {
6666
match pat.node {
6767
PatIdent(*) => pat_is_binding(dm, pat),
68-
PatWild | PatWildMulti => true,
68+
PatWild => true,
6969
_ => false
7070
}
7171
}

trunk/src/librustc/middle/trans/_match.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ fn enter_default<'r>(bcx: @mut Block,
545545
// Collect all of the matches that can match against anything.
546546
let matches = do enter_match(bcx, dm, m, col, val) |p| {
547547
match p.node {
548-
ast::PatWild | ast::PatWildMulti | ast::PatTup(_) => Some(~[]),
548+
ast::PatWild | ast::PatTup(_) => Some(~[]),
549549
ast::PatIdent(_, _, None) if pat_is_binding(dm, p) => Some(~[]),
550550
_ => None
551551
}
@@ -2234,7 +2234,7 @@ fn bind_irrefutable_pat(bcx: @mut Block,
22342234
pat.span,
22352235
format!("vector patterns are never irrefutable!"));
22362236
}
2237-
ast::PatWild | ast::PatWildMulti | ast::PatLit(_) | ast::PatRange(_, _) => ()
2237+
ast::PatWild | ast::PatLit(_) | ast::PatRange(_, _) => ()
22382238
}
22392239
return bcx;
22402240
}

trunk/src/librustc/middle/trans/controlflow.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ use middle::trans::base::*;
1414
use middle::trans::build::*;
1515
use middle::trans::callee;
1616
use middle::trans::common::*;
17-
use middle::trans::debuginfo;
1817
use middle::trans::expr;
1918
use middle::ty;
2019
use util::common::indenter;
@@ -76,7 +75,6 @@ pub fn trans_if(bcx: @mut Block,
7675
// if true { .. } [else { .. }]
7776
return do with_scope(bcx, thn.info(), "if_true_then") |bcx| {
7877
let bcx_out = trans_block(bcx, thn, dest);
79-
debuginfo::clear_source_location(bcx.fcx);
8078
trans_block_cleanups(bcx_out, block_cleanups(bcx))
8179
}
8280
} else {
@@ -88,7 +86,6 @@ pub fn trans_if(bcx: @mut Block,
8886
Some(elexpr) => {
8987
return do with_scope(bcx, elexpr.info(), "if_false_then") |bcx| {
9088
let bcx_out = trans_if_else(bcx, elexpr, dest);
91-
debuginfo::clear_source_location(bcx.fcx);
9289
trans_block_cleanups(bcx_out, block_cleanups(bcx))
9390
}
9491
}
@@ -101,8 +98,6 @@ pub fn trans_if(bcx: @mut Block,
10198
let then_bcx_in = scope_block(bcx, thn.info(), "then");
10299

103100
let then_bcx_out = trans_block(then_bcx_in, thn, dest);
104-
105-
debuginfo::clear_source_location(bcx.fcx);
106101
let then_bcx_out = trans_block_cleanups(then_bcx_out,
107102
block_cleanups(then_bcx_in));
108103

@@ -127,9 +122,6 @@ pub fn trans_if(bcx: @mut Block,
127122
debug!("then_bcx_in={}, else_bcx_in={}",
128123
then_bcx_in.to_str(), else_bcx_in.to_str());
129124

130-
// Clear the source location because it is still set to whatever has been translated
131-
// right before.
132-
debuginfo::clear_source_location(else_bcx_in.fcx);
133125
CondBr(bcx, cond_val, then_bcx_in.llbb, else_bcx_in.llbb);
134126
return next_bcx;
135127

@@ -147,7 +139,6 @@ pub fn trans_if(bcx: @mut Block,
147139
// would be nice to have a constraint on ifs
148140
_ => else_bcx_in.tcx().sess.bug("strange alternative in if")
149141
};
150-
debuginfo::clear_source_location(else_bcx_in.fcx);
151142
trans_block_cleanups(else_bcx_out, block_cleanups(else_bcx_in))
152143
}
153144
}

trunk/src/librustc/middle/trans/debuginfo.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -509,17 +509,6 @@ pub fn set_source_location(fcx: &FunctionContext,
509509
}
510510
}
511511

512-
/// Clears the current debug location.
513-
///
514-
/// Instructions generated hereafter won't be assigned a source location.
515-
pub fn clear_source_location(fcx: &FunctionContext) {
516-
if fn_should_be_ignored(fcx) {
517-
return;
518-
}
519-
520-
set_debug_location(fcx.ccx, UnknownLocation);
521-
}
522-
523512
/// Enables emitting source locations for the given functions.
524513
///
525514
/// Since we don't want source locations to be emitted for the function prelude, they are disabled
@@ -2429,7 +2418,7 @@ fn populate_scope_map(cx: &mut CrateContext,
24292418
}
24302419
}
24312420

2432-
ast::PatWild | ast::PatWildMulti => {
2421+
ast::PatWild => {
24332422
scope_map.insert(pat.id, scope_stack.last().scope_metadata);
24342423
}
24352424

trunk/src/librustc/middle/typeck/check/_match.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ pub fn check_pat(pcx: &pat_ctxt, pat: @ast::Pat, expected: ty::t) {
414414
let tcx = pcx.fcx.ccx.tcx;
415415

416416
match pat.node {
417-
ast::PatWild | ast::PatWildMulti => {
417+
ast::PatWild => {
418418
fcx.write_ty(pat.id, expected);
419419
}
420420
ast::PatLit(lt) => {

trunk/src/librustc/middle/typeck/check/regionck.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,7 +1219,7 @@ pub mod guarantor {
12191219
rcx.fcx.pat_to_str(pat), guarantor);
12201220

12211221
match pat.node {
1222-
ast::PatWild | ast::PatWildMulti => {}
1222+
ast::PatWild => {}
12231223
ast::PatIdent(ast::BindByRef(_), _, opt_p) => {
12241224
link(rcx, pat.span, pat.id, guarantor);
12251225

trunk/src/librustdoc/clean.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,6 @@ fn name_from_pat(p: &ast::Pat) -> ~str {
11371137
use syntax::ast::*;
11381138
match p.node {
11391139
PatWild => ~"_",
1140-
PatWildMulti => ~"..",
11411140
PatIdent(_, ref p, _) => path_to_str(p),
11421141
PatEnum(ref p, _) => path_to_str(p),
11431142
PatStruct(*) => fail!("tried to get argument name from pat_struct, \

trunk/src/libstd/rt/basic.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,11 @@ impl Drop for BasicPausible {
241241

242242
fn time() -> Time {
243243
extern {
244-
fn get_time(sec: &mut i64, nsec: &mut i32);
244+
fn rust_get_time(sec: &mut i64, nsec: &mut i32);
245245
}
246246
let mut sec = 0;
247247
let mut nsec = 0;
248-
unsafe { get_time(&mut sec, &mut nsec) }
248+
unsafe { rust_get_time(&mut sec, &mut nsec) }
249249

250250
Time { sec: sec as u64, nsec: nsec as u64 }
251251
}

trunk/src/libstd/rt/context.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ impl Context {
5959
// which we will then modify to call the given function when restored
6060
let mut regs = new_regs();
6161
unsafe {
62-
swap_registers(transmute_mut_region(&mut *regs), transmute_region(&*regs));
62+
rust_swap_registers(transmute_mut_region(&mut *regs), transmute_region(&*regs));
6363
};
6464

6565
initialize_call_frame(&mut *regs, fp, argp, sp);
@@ -104,22 +104,22 @@ impl Context {
104104
// stack limit in the OS-specified TLS slot. This also means that
105105
// we cannot call any more rust functions after record_stack_bounds
106106
// returns because they would all likely fail due to the limit being
107-
// invalid for the current task. Lucky for us `swap_registers` is a
108-
// C function so we don't have to worry about that!
107+
// invalid for the current task. Lucky for us `rust_swap_registers`
108+
// is a C function so we don't have to worry about that!
109109
match in_context.stack_bounds {
110110
Some((lo, hi)) => record_stack_bounds(lo, hi),
111111
// If we're going back to one of the original contexts or
112112
// something that's possibly not a "normal task", then reset
113113
// the stack limit to 0 to make morestack never fail
114114
None => record_stack_bounds(0, uint::max_value),
115115
}
116-
swap_registers(out_regs, in_regs)
116+
rust_swap_registers(out_regs, in_regs)
117117
}
118118
}
119119
}
120120

121121
extern {
122-
fn swap_registers(out_regs: *mut Registers, in_regs: *Registers);
122+
fn rust_swap_registers(out_regs: *mut Registers, in_regs: *Registers);
123123
}
124124

125125
// Register contexts used in various architectures
@@ -142,7 +142,7 @@ extern {
142142
//
143143
// These structures/functions are roughly in-sync with the source files inside
144144
// of src/rt/arch/$arch. The only currently used function from those folders is
145-
// the `swap_registers` function, but that's only because for now segmented
145+
// the `rust_swap_registers` function, but that's only because for now segmented
146146
// stacks are disabled.
147147

148148
#[cfg(target_arch = "x86")]

trunk/src/libsyntax/ast.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,6 @@ pub enum BindingMode {
337337
#[deriving(Clone, Eq, Encodable, Decodable, IterBytes)]
338338
pub enum Pat_ {
339339
PatWild,
340-
PatWildMulti,
341340
// A pat_ident may either be a new bound variable,
342341
// or a nullary enum (in which case the second field
343342
// is None).

trunk/src/libsyntax/ast_util.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ pub fn walk_pat(pat: @Pat, it: &fn(@Pat) -> bool) -> bool {
657657
slice.iter().advance(|&p| walk_pat(p, |p| it(p))) &&
658658
after.iter().advance(|&p| walk_pat(p, |p| it(p)))
659659
}
660-
PatWild | PatWildMulti | PatLit(_) | PatRange(_, _) | PatIdent(_, _, _) |
660+
PatWild | PatLit(_) | PatRange(_, _) | PatIdent(_, _, _) |
661661
PatEnum(_, _) => {
662662
true
663663
}

trunk/src/libsyntax/fold.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,6 @@ pub trait ast_fold {
174174
fn fold_pat(&self, p: @Pat) -> @Pat {
175175
let node = match p.node {
176176
PatWild => PatWild,
177-
PatWildMulti => PatWildMulti,
178177
PatIdent(binding_mode, ref pth, ref sub) => {
179178
PatIdent(binding_mode,
180179
self.fold_path(pth),

trunk/src/libsyntax/parse/obsolete.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,6 @@ pub enum ObsoleteSyntax {
3939
ObsoleteConstPointer,
4040
ObsoleteEmptyImpl,
4141
ObsoleteLoopAsContinue,
42-
ObsoleteEnumWildcard,
43-
ObsoleteStructWildcard,
44-
ObsoleteVecDotDotWildcard
4542
}
4643

4744
impl to_bytes::IterBytes for ObsoleteSyntax {
@@ -116,18 +113,6 @@ impl ParserObsoleteMethods for Parser {
116113
"`loop` is now only used for loops and `continue` is used for \
117114
skipping iterations"
118115
),
119-
ObsoleteEnumWildcard => (
120-
"enum wildcard",
121-
"use `..` instead of `*` for matching all enum fields"
122-
),
123-
ObsoleteStructWildcard => (
124-
"struct wildcard",
125-
"use `..` instead of `_` for matching trailing struct fields"
126-
),
127-
ObsoleteVecDotDotWildcard => (
128-
"vec slice wildcard",
129-
"use `..` instead of `.._` for matching slices"
130-
),
131116
};
132117

133118
self.report(sp, kind, kind_str, desc);

0 commit comments

Comments
 (0)