Skip to content

Commit 5e1a5bc

Browse files
committed
---
yaml --- r: 233837 b: refs/heads/beta c: b69347c h: refs/heads/master i: 233835: 2d23a2e v: v3
1 parent bcbecbc commit 5e1a5bc

File tree

8 files changed

+42
-41
lines changed

8 files changed

+42
-41
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 7bb0d0d74ca23cb871fd058a3fc6d935b7e47ae7
26+
refs/heads/beta: b69347c00c755955ce0c49c3495eb9f7e18439e5
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: 370fe2786109360f7c35b8ba552b83b773dd71d6
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustc/ast_map/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ impl<'ast> Map<'ast> {
480480
NodeImplItem(ii) => PathName(ii.ident.name),
481481
NodeTraitItem(ti) => PathName(ti.ident.name),
482482
NodeVariant(v) => PathName(v.node.name.name),
483-
NodeLifetime(lt) => PathName(lt.name),
484483
_ => panic!("no path elem for {:?}", node)
485484
}
486485
}

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1733,7 +1733,7 @@ pub struct FreeRegion {
17331733
}
17341734

17351735
#[derive(Clone, PartialEq, PartialOrd, Eq, Ord, Hash,
1736-
RustcEncodable, RustcDecodable, Copy)]
1736+
RustcEncodable, RustcDecodable, Copy, Debug)]
17371737
pub enum BoundRegion {
17381738
/// An anonymous region parameter for a given fn (&T)
17391739
BrAnon(u32),
@@ -2325,7 +2325,7 @@ pub struct TypeParameterDef<'tcx> {
23252325
pub object_lifetime_default: ObjectLifetimeDefault,
23262326
}
23272327

2328-
#[derive(Clone)]
2328+
#[derive(Clone, Debug)]
23292329
pub struct RegionParameterDef {
23302330
pub name: ast::Name,
23312331
pub def_id: DefId,

branches/beta/src/librustc/util/ppaux.rs

Lines changed: 2 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -307,20 +307,8 @@ impl<'tcx> fmt::Display for ty::TraitTy<'tcx> {
307307

308308
impl<'tcx> fmt::Debug for ty::TypeParameterDef<'tcx> {
309309
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
310-
write!(f, "TypeParameterDef({}, {}:{}, {:?}/{})",
311-
self.name,
312-
self.def_id.krate, self.def_id.node,
313-
self.space, self.index)
314-
}
315-
}
316-
317-
impl fmt::Debug for ty::RegionParameterDef {
318-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
319-
write!(f, "RegionParameterDef({}, {}:{}, {:?}/{}, {:?})",
320-
self.name,
321-
self.def_id.krate, self.def_id.node,
322-
self.space, self.index,
323-
self.bounds)
310+
write!(f, "TypeParameterDef({:?}, {:?}/{})",
311+
self.def_id, self.space, self.index)
324312
}
325313
}
326314

@@ -400,19 +388,6 @@ impl fmt::Display for ty::BoundRegion {
400388
}
401389
}
402390

403-
impl fmt::Debug for ty::BoundRegion {
404-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
405-
match *self {
406-
BrAnon(n) => write!(f, "BrAnon({:?})", n),
407-
BrFresh(n) => write!(f, "BrFresh({:?})", n),
408-
BrNamed(did, name) => {
409-
write!(f, "BrNamed({}:{}, {:?})", did.krate, did.node, name)
410-
}
411-
BrEnv => "BrEnv".fmt(f),
412-
}
413-
}
414-
}
415-
416391
impl fmt::Debug for ty::Region {
417392
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
418393
match *self {

branches/beta/src/librustc_trans/trans/adt.rs

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -177,12 +177,15 @@ pub fn represent_type<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
177177
repr
178178
}
179179

180-
const fn repeat_u8_as_u32(val: u8) -> u32 {
181-
(val as u32) << 24 | (val as u32) << 16 | (val as u32) << 8 | val as u32
180+
macro_rules! repeat_u8_as_u32 {
181+
($name:expr) => { (($name as u32) << 24 |
182+
($name as u32) << 16 |
183+
($name as u32) << 8 |
184+
($name as u32)) }
182185
}
183-
184-
const fn repeat_u8_as_u64(val: u8) -> u64 {
185-
(repeat_u8_as_u32(val) as u64) << 32 | repeat_u8_as_u32(val) as u64
186+
macro_rules! repeat_u8_as_u64 {
187+
($name:expr) => { ((repeat_u8_as_u32!($name) as u64) << 32 |
188+
(repeat_u8_as_u32!($name) as u64)) }
186189
}
187190

188191
/// `DTOR_NEEDED_HINT` is a stack-local hint that just means
@@ -200,8 +203,8 @@ pub const DTOR_NEEDED_HINT: u8 = 0x3d;
200203
pub const DTOR_MOVED_HINT: u8 = 0x2d;
201204

202205
pub const DTOR_NEEDED: u8 = 0xd4;
203-
pub const DTOR_NEEDED_U32: u32 = repeat_u8_as_u32(DTOR_NEEDED);
204-
pub const DTOR_NEEDED_U64: u64 = repeat_u8_as_u64(DTOR_NEEDED);
206+
pub const DTOR_NEEDED_U32: u32 = repeat_u8_as_u32!(DTOR_NEEDED);
207+
pub const DTOR_NEEDED_U64: u64 = repeat_u8_as_u64!(DTOR_NEEDED);
205208
#[allow(dead_code)]
206209
pub fn dtor_needed_usize(ccx: &CrateContext) -> usize {
207210
match &ccx.tcx().sess.target.target.target_pointer_width[..] {
@@ -212,8 +215,8 @@ pub fn dtor_needed_usize(ccx: &CrateContext) -> usize {
212215
}
213216

214217
pub const DTOR_DONE: u8 = 0x1d;
215-
pub const DTOR_DONE_U32: u32 = repeat_u8_as_u32(DTOR_DONE);
216-
pub const DTOR_DONE_U64: u64 = repeat_u8_as_u64(DTOR_DONE);
218+
pub const DTOR_DONE_U32: u32 = repeat_u8_as_u32!(DTOR_DONE);
219+
pub const DTOR_DONE_U64: u64 = repeat_u8_as_u64!(DTOR_DONE);
217220
#[allow(dead_code)]
218221
pub fn dtor_done_usize(ccx: &CrateContext) -> usize {
219222
match &ccx.tcx().sess.target.target.target_pointer_width[..] {

branches/beta/src/libsyntax/ast.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1372,6 +1372,8 @@ pub struct TypeBinding {
13721372
pub span: Span,
13731373
}
13741374

1375+
1376+
// NB PartialEq method appears below.
13751377
#[derive(Clone, PartialEq, Eq, RustcEncodable, RustcDecodable, Hash)]
13761378
pub struct Ty {
13771379
pub id: NodeId,

branches/beta/src/libsyntax/parse/parser.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2142,7 +2142,6 @@ impl<'a> Parser<'a> {
21422142
return self.parse_loop_expr(None, lo);
21432143
}
21442144
if try!(self.eat_keyword(keywords::Continue) ){
2145-
let lo = self.span.lo;
21462145
let ex = if self.token.is_lifetime() {
21472146
let lifetime = self.get_lifetime();
21482147
try!(self.bump());
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
// Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
// Make sure that a continue span actually contains the keyword.
12+
13+
fn main() {
14+
'a: loop {
15+
if false {
16+
continue //~ ERROR use of undeclared label
17+
'b;
18+
} else {
19+
break //~ ERROR use of undeclared label
20+
'c;
21+
}
22+
}
23+
}

0 commit comments

Comments
 (0)