Skip to content

Commit c4f04b9

Browse files
committed
---
yaml --- r: 185583 b: refs/heads/master c: 28362d5 h: refs/heads/master i: 185581: fd398f6 185579: a9558dc 185575: e597fdf 185567: d76032e v: v3
1 parent 6933bd1 commit c4f04b9

File tree

7 files changed

+26
-28
lines changed

7 files changed

+26
-28
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: 87391ed52ac7fcd00dbb710e3feb2388cc143b58
2+
refs/heads/master: 28362d542d2561c4cc16cb3229ce3fed7317dbd6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 3a96d6a9818fe2affc98a187fb1065120458cee9
55
refs/heads/try: ccf8fedf1cffcb8f6f3581d53d220039e192fe77

trunk/src/libcore/fmt/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ impl Display for char {
700700
impl<T> Pointer for *const T {
701701
fn fmt(&self, f: &mut Formatter) -> Result {
702702
f.flags |= 1 << (FlagV1::Alternate as u32);
703-
let ret = LowerHex::fmt(&(*self as usize), f);
703+
let ret = LowerHex::fmt(&(*self as u32), f);
704704
f.flags &= !(1 << (FlagV1::Alternate as u32));
705705
ret
706706
}

trunk/src/libcore/iter.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ use num::{ToPrimitive, Int};
6868
use ops::{Add, Deref, FnMut};
6969
use option::Option;
7070
use option::Option::{Some, None};
71-
use marker::Sized;
71+
use marker::{Send, Sized, Sync};
7272
use usize;
7373

7474
/// An interface for dealing with "external iterators". These types of iterators
@@ -1783,6 +1783,10 @@ pub struct Peekable<I: Iterator> {
17831783
peeked: Option<I::Item>,
17841784
}
17851785

1786+
// FIXME: after #22828 being fixed, the following unsafe impl should be removed
1787+
unsafe impl<I: Iterator> Sync for Peekable<I> where I: Sync, I::Item: Sync {}
1788+
unsafe impl<I: Iterator> Send for Peekable<I> where I: Send, I::Item: Send {}
1789+
17861790
impl<I: Iterator + Clone> Clone for Peekable<I> where I::Item: Clone {
17871791
fn clone(&self) -> Peekable<I> {
17881792
Peekable {

trunk/src/librustc_trans/trans/base.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -433,13 +433,13 @@ pub fn set_inline_hint(f: ValueRef) {
433433
}
434434

435435
pub fn set_llvm_fn_attrs(ccx: &CrateContext, attrs: &[ast::Attribute], llfn: ValueRef) {
436-
use syntax::attr::{find_inline_attr, InlineAttr};
436+
use syntax::attr::*;
437437
// Set the inline hint if there is one
438438
match find_inline_attr(Some(ccx.sess().diagnostic()), attrs) {
439-
InlineAttr::Hint => set_inline_hint(llfn),
440-
InlineAttr::Always => set_always_inline(llfn),
441-
InlineAttr::Never => set_no_inline(llfn),
442-
InlineAttr::None => { /* fallthrough */ }
439+
InlineHint => set_inline_hint(llfn),
440+
InlineAlways => set_always_inline(llfn),
441+
InlineNever => set_no_inline(llfn),
442+
InlineNone => { /* fallthrough */ }
443443
}
444444

445445
for attr in attrs {

trunk/src/libstd/sys/unix/thread.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ pub mod guard {
164164

165165
if pthread_main_np() == 1 {
166166
// main thread
167-
current_stack.ss_sp as uint - current_stack.ss_size as uint + 3 * PAGE_SIZE as uint
167+
current_stack.ss_sp as uint - current_stack.ss_size as uint + PAGE_SIZE as uint
168168

169169
} else {
170170
// new thread

trunk/src/libsyntax/attr.rs

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
// Functions dealing with attributes and meta items
1212

13+
pub use self::InlineAttr::*;
1314
pub use self::StabilityLevel::*;
1415
pub use self::ReprAttr::*;
1516
pub use self::IntType::*;
@@ -284,33 +285,33 @@ pub fn find_crate_name(attrs: &[Attribute]) -> Option<InternedString> {
284285

285286
#[derive(Copy, PartialEq)]
286287
pub enum InlineAttr {
287-
None,
288-
Hint,
289-
Always,
290-
Never,
288+
InlineNone,
289+
InlineHint,
290+
InlineAlways,
291+
InlineNever,
291292
}
292293

293294
/// Determine what `#[inline]` attribute is present in `attrs`, if any.
294295
pub fn find_inline_attr(diagnostic: Option<&SpanHandler>, attrs: &[Attribute]) -> InlineAttr {
295296
// FIXME (#2809)---validate the usage of #[inline] and #[inline]
296-
attrs.iter().fold(InlineAttr::None, |ia,attr| {
297+
attrs.iter().fold(InlineNone, |ia,attr| {
297298
match attr.node.value.node {
298299
MetaWord(ref n) if *n == "inline" => {
299300
mark_used(attr);
300-
InlineAttr::Hint
301+
InlineHint
301302
}
302303
MetaList(ref n, ref items) if *n == "inline" => {
303304
mark_used(attr);
304305
if items.len() != 1 {
305306
diagnostic.map(|d|{ d.span_err(attr.span, "expected one argument"); });
306-
InlineAttr::None
307+
InlineNone
307308
} else if contains_name(&items[..], "always") {
308-
InlineAttr::Always
309+
InlineAlways
309310
} else if contains_name(&items[..], "never") {
310-
InlineAttr::Never
311+
InlineNever
311312
} else {
312313
diagnostic.map(|d|{ d.span_err((*items[0]).span, "invalid argument"); });
313-
InlineAttr::None
314+
InlineNone
314315
}
315316
}
316317
_ => ia
@@ -321,8 +322,8 @@ pub fn find_inline_attr(diagnostic: Option<&SpanHandler>, attrs: &[Attribute]) -
321322
/// True if `#[inline]` or `#[inline(always)]` is present in `attrs`.
322323
pub fn requests_inline(attrs: &[Attribute]) -> bool {
323324
match find_inline_attr(None, attrs) {
324-
InlineAttr::Hint | InlineAttr::Always => true,
325-
InlineAttr::None | InlineAttr::Never => false,
325+
InlineHint | InlineAlways => true,
326+
InlineNone | InlineNever => false,
326327
}
327328
}
328329

trunk/src/test/run-pass/ifmt.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -137,13 +137,6 @@ pub fn main() {
137137
t!(format!("{:+10.3e}", 1.2345e6f64), " +1.234e6");
138138
t!(format!("{:+10.3e}", -1.2345e6f64), " -1.234e6");
139139

140-
// Test that pointers don't get truncated.
141-
{
142-
let val = usize::MAX;
143-
let exp = format!("{:#x}", val);
144-
t!(format!("{:p}", val as *const isize), exp);
145-
}
146-
147140
// Escaping
148141
t!(format!("{{"), "{");
149142
t!(format!("}}"), "}");

0 commit comments

Comments
 (0)