Skip to content

Commit 13336a1

Browse files
committed
---
yaml --- r: 146302 b: refs/heads/try2 c: 727731f h: refs/heads/master v: v3
1 parent 55066cb commit 13336a1

File tree

8 files changed

+13
-13
lines changed

8 files changed

+13
-13
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: 01097cbab00f64b922bcf5b91fb26a68f6d0d9cf
8+
refs/heads/try2: 727731f89ed5c341237705026f50f5f6a566336d
99
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
1010
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1111
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try2/src/libextra/enum_set.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,8 @@ mod test {
139139

140140
use enum_set::*;
141141

142-
#[deriving(Eq)] #[repr(uint)]
142+
#[deriving(Eq)]
143+
#[repr(uint)]
143144
enum Foo {
144145
A, B, C
145146
}

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ pub static tag_items_data_item_reexport_def_id: uint = 0x4e;
111111
pub static tag_items_data_item_reexport_name: uint = 0x4f;
112112

113113
// used to encode crate_ctxt side tables
114-
#[deriving(Eq)] #[repr(uint)]
114+
#[deriving(Eq)]
115+
#[repr(uint)]
115116
pub enum astencode_tag { // Reserves 0x50 -- 0x6f
116117
tag_ast = 0x50,
117118

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ fn bounds_usable(cx: &mut CrateContext, ity: IntType, bounds: &IntBounds) -> boo
359359
}
360360
}
361361

362-
fn ty_of_inttype(ity: IntType) -> ty::t {
362+
pub fn ty_of_inttype(ity: IntType) -> ty::t {
363363
match ity {
364364
attr::SignedInt(t) => ty::mk_mach_int(t),
365365
attr::UnsignedInt(t) => ty::mk_mach_uint(t)

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ use std::libc::{c_uint, c_ulonglong, c_longlong};
109109
use std::ptr;
110110
use std::unstable::atomics;
111111
use std::vec;
112-
use syntax::attr;
113112
use syntax::codemap::{Span, Pos};
114113
use syntax::{ast, codemap, ast_util, ast_map, opt_vec};
115114
use syntax::parse::token;
@@ -1422,10 +1421,8 @@ fn prepare_enum_metadata(cx: &mut CrateContext,
14221421
let discriminant_type_metadata = |inttype| {
14231422
let discriminant_llvm_type = adt::ll_inttype(cx, inttype);
14241423
let (discriminant_size, discriminant_align) = size_and_align_of(cx, discriminant_llvm_type);
1425-
let discriminant_base_type_metadata = type_metadata(cx, match inttype {
1426-
attr::SignedInt(t) => ty::mk_mach_int(t),
1427-
attr::UnsignedInt(t) => ty::mk_mach_uint(t)
1428-
}, codemap::dummy_sp());
1424+
let discriminant_base_type_metadata = type_metadata(cx, adt::ty_of_inttype(inttype),
1425+
codemap::dummy_sp());
14291426
do enum_name.with_c_str |enum_name| {
14301427
unsafe {
14311428
llvm::LLVMDIBuilderCreateEnumerationType(

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -715,7 +715,8 @@ pub struct ParamBounds {
715715

716716
pub type BuiltinBounds = EnumSet<BuiltinBound>;
717717

718-
#[deriving(Clone, Eq, IterBytes, ToStr)] #[repr(uint)]
718+
#[deriving(Clone, Eq, IterBytes, ToStr)]
719+
#[repr(uint)]
719720
pub enum BuiltinBound {
720721
BoundStatic,
721722
BoundSend,

branches/try2/src/libsyntax/attr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,7 @@ pub fn find_repr_attr(diagnostic: @mut span_handler, attr: @ast::MetaItem, acc:
385385
for item in items.iter() {
386386
match item.node {
387387
ast::MetaWord(word) => {
388-
let word: &str = word;
389-
let hint = match word {
388+
let hint = match word.as_slice() {
390389
// Can't use "extern" because it's not a lexical identifier.
391390
"C" => ReprExtern,
392391
_ => match int_type_of_word(word) {

branches/try2/src/test/run-pass/issue-2718.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ pub mod pipes {
2626
payload: Option<T>
2727
}
2828

29-
#[deriving(Eq)] #[repr(int)]
29+
#[deriving(Eq)]
30+
#[repr(int)]
3031
pub enum state {
3132
empty,
3233
full,

0 commit comments

Comments
 (0)