Skip to content

Commit 701de42

Browse files
committed
---
yaml --- r: 235647 b: refs/heads/stable c: c35b2bd h: refs/heads/master i: 235645: 2980e76 235643: 27b9615 235639: 21c5863 235631: 48ca229 235615: 7610402 235583: 2693e47 235519: a8b5df3 v: v3
1 parent 723e8b5 commit 701de42

File tree

140 files changed

+1298
-2790
lines changed

Some content is hidden

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

140 files changed

+1298
-2790
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/heads/tmp: afae2ff723393b3ab4ccffef6ac7c6d1809e2da0
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: f859507de8c410b648d934d8f5ec1c52daac971d
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828
32-
refs/heads/stable: 90904204d6218ecb4bdfb36015759ade77b10f4b
32+
refs/heads/stable: c35b2bd226736925961ca6853b2ef29e8094cd90
3333
refs/tags/1.0.0: 55bd4f8ff2b323f317ae89e254ce87162d52a375
3434
refs/tags/1.1.0: bc3c16f09287e5545c1d3f76b7abd54f2eca868b
3535
refs/tags/1.2.0: f557861f822c34f07270347b94b5280de20a597e

branches/stable/configure

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -323,17 +323,6 @@ envopt() {
323323
fi
324324
}
325325

326-
enable_if_not_disabled() {
327-
local OP=$1
328-
local UOP=$(echo $OP | tr '[:lower:]' '[:upper:]' | tr '\-' '\_')
329-
local ENAB_V="CFG_ENABLE_$UOP"
330-
local EXPLICITLY_DISABLED="CFG_DISABLE_${UOP}_PROVIDED"
331-
eval VV=\$$EXPLICITLY_DISABLED
332-
if [ -z "$VV" ]; then
333-
eval $ENAB_V=1
334-
fi
335-
}
336-
337326
to_llvm_triple() {
338327
case $1 in
339328
i686-w64-mingw32) echo i686-pc-windows-gnu ;;
@@ -682,12 +671,10 @@ if [ -n "$CFG_ENABLE_DEBUG" ]; then
682671
CFG_DISABLE_OPTIMIZE=1
683672
CFG_DISABLE_OPTIMIZE_CXX=1
684673
fi
685-
686-
# Set following variables to 1 unless setting already provided
687-
enable_if_not_disabled debug-assertions
688-
enable_if_not_disabled debug-jemalloc
689-
enable_if_not_disabled debuginfo
690-
enable_if_not_disabled llvm-assertions
674+
CFG_ENABLE_DEBUG_ASSERTIONS=1
675+
CFG_ENABLE_DEBUG_JEMALLOC=1
676+
CFG_ENABLE_DEBUGINFO=1
677+
CFG_ENABLE_LLVM_ASSERTIONS=1
691678
fi
692679

693680
# OK, now write the debugging options

branches/stable/mk/rt.mk

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -54,15 +54,6 @@ NATIVE_DEPS_miniz_$(1) = miniz.c
5454
NATIVE_DEPS_rust_builtin_$(1) := rust_builtin.c \
5555
rust_android_dummy.c
5656
NATIVE_DEPS_rustrt_native_$(1) := arch/$$(HOST_$(1))/record_sp.S
57-
ifeq ($$(findstring msvc,$(1)),msvc)
58-
ifeq ($$(findstring i686,$(1)),i686)
59-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_32.ll
60-
else
61-
NATIVE_DEPS_rustrt_native_$(1) += rust_try_msvc_64.ll
62-
endif
63-
else
64-
NATIVE_DEPS_rustrt_native_$(1) += rust_try.ll
65-
endif
6657
NATIVE_DEPS_rust_test_helpers_$(1) := rust_test_helpers.c
6758
NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
6859

@@ -76,14 +67,6 @@ NATIVE_DEPS_morestack_$(1) := arch/$$(HOST_$(1))/morestack.S
7667

7768
RT_OUTPUT_DIR_$(1) := $(1)/rt
7869

79-
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.ll $$(MKFILE_DEPS) \
80-
$$(LLVM_CONFIG_$$(CFG_BUILD))
81-
@mkdir -p $$(@D)
82-
@$$(call E, compile: $$@)
83-
$$(Q)$$(LLC_$$(CFG_BUILD)) $$(CFG_LLC_FLAGS_$(1)) \
84-
-filetype=obj -mtriple=$$(CFG_LLVM_TARGET_$(1)) \
85-
-relocation-model=pic -o $$@ $$<
86-
8770
$$(RT_OUTPUT_DIR_$(1))/%.o: $(S)src/rt/%.c $$(MKFILE_DEPS)
8871
@mkdir -p $$(@D)
8972
@$$(call E, compile: $$@)
@@ -122,7 +105,6 @@ define THIRD_PARTY_LIB
122105
OBJS_$(2)_$(1) := $$(NATIVE_DEPS_$(2)_$(1):%=$$(RT_OUTPUT_DIR_$(1))/%)
123106
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.c=.o)
124107
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.cpp=.o)
125-
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.ll=.o)
126108
OBJS_$(2)_$(1) := $$(OBJS_$(2)_$(1):.S=.o)
127109
NATIVE_$(2)_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),$(2))
128110
$$(RT_OUTPUT_DIR_$(1))/$$(NATIVE_$(2)_$(1)): $$(OBJS_$(2)_$(1))

branches/stable/src/liballoc/lib.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,20 @@ pub fn oom() -> ! {
135135
// allocate.
136136
unsafe { core::intrinsics::abort() }
137137
}
138+
139+
// FIXME(#14344): When linking liballoc with libstd, this library will be linked
140+
// as an rlib (it only exists as an rlib). It turns out that an
141+
// optimized standard library doesn't actually use *any* symbols
142+
// from this library. Everything is inlined and optimized away.
143+
// This means that linkers will actually omit the object for this
144+
// file, even though it may be needed in the future.
145+
//
146+
// To get around this for now, we define a dummy symbol which
147+
// will never get inlined so the stdlib can call it. The stdlib's
148+
// reference to this symbol will cause this library's object file
149+
// to get linked in to libstd successfully (the linker won't
150+
// optimize it out).
151+
#[doc(hidden)]
152+
#[unstable(feature = "issue_14344_fixme")]
153+
#[cfg(stage0)]
154+
pub fn fixme_14344_be_sure_to_link_to_collections() {}

branches/stable/src/libcollections/lib.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,13 @@ pub mod btree_set {
133133
pub use btree::set::*;
134134
}
135135

136+
137+
// FIXME(#14344) this shouldn't be necessary
138+
#[doc(hidden)]
139+
#[unstable(feature = "issue_14344_fixme")]
140+
#[cfg(stage0)]
141+
pub fn fixme_14344_be_sure_to_link_to_collections() {}
142+
136143
#[cfg(not(test))]
137144
mod std {
138145
pub use core::ops; // RangeFull

branches/stable/src/libcollections/slice.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! A dynamically-sized view into a contiguous sequence, `[T]`.
11+
//! Utilities for slice manipulation
1212
//!
13+
//! The `slice` module contains useful code to help work with slice values.
1314
//! Slices are a view into a block of memory represented as a pointer and a
1415
//! length.
1516
//!
@@ -77,8 +78,7 @@
7778
//! iterators.
7879
//! * Further methods that return iterators are `.split()`, `.splitn()`,
7980
//! `.chunks()`, `.windows()` and more.
80-
//!
81-
//! *[See also the slice primitive type](../primitive.slice.html).*
81+
#![doc(primitive = "slice")]
8282
#![stable(feature = "rust1", since = "1.0.0")]
8383

8484
// Many of the usings in this module are only used in the test configuration.

branches/stable/src/libcollections/str.rs

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,43 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
//! Unicode string slices
11+
//! Unicode string manipulation (the `str` type).
1212
//!
13-
//! *[See also the `str` primitive type](../primitive.str.html).*
14-
13+
//! Rust's `str` type is one of the core primitive types of the language. `&str`
14+
//! is the borrowed string type. This type of string can only be created from
15+
//! other strings, unless it is a `&'static str` (see below). It is not possible
16+
//! to move out of borrowed strings because they are owned elsewhere.
17+
//!
18+
//! # Examples
19+
//!
20+
//! Here's some code that uses a `&str`:
21+
//!
22+
//! ```
23+
//! let s = "Hello, world.";
24+
//! ```
25+
//!
26+
//! This `&str` is a `&'static str`, which is the type of string literals.
27+
//! They're `'static` because literals are available for the entire lifetime of
28+
//! the program.
29+
//!
30+
//! You can get a non-`'static` `&str` by taking a slice of a `String`:
31+
//!
32+
//! ```
33+
//! let some_string = "Hello, world.".to_string();
34+
//! let s = &some_string;
35+
//! ```
36+
//!
37+
//! # Representation
38+
//!
39+
//! Rust's string type, `str`, is a sequence of Unicode scalar values encoded as
40+
//! a stream of UTF-8 bytes. All [strings](../../reference.html#literals) are
41+
//! guaranteed to be validly encoded UTF-8 sequences. Additionally, strings are
42+
//! not null-terminated and can thus contain null bytes.
43+
//!
44+
//! The actual representation of `str`s have direct mappings to slices: `&str`
45+
//! is the same as `&[u8]`.
1546
47+
#![doc(primitive = "str")]
1648
#![stable(feature = "rust1", since = "1.0.0")]
1749

1850
// Many of the usings in this module are only used in the test configuration.

branches/stable/src/libcollections/string.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -979,20 +979,23 @@ impl ops::Index<ops::RangeFull> for String {
979979
}
980980
}
981981

982+
#[cfg(not(stage0))]
982983
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
983984
impl ops::IndexMut<ops::Range<usize>> for String {
984985
#[inline]
985986
fn index_mut(&mut self, index: ops::Range<usize>) -> &mut str {
986987
&mut self[..][index]
987988
}
988989
}
990+
#[cfg(not(stage0))]
989991
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
990992
impl ops::IndexMut<ops::RangeTo<usize>> for String {
991993
#[inline]
992994
fn index_mut(&mut self, index: ops::RangeTo<usize>) -> &mut str {
993995
&mut self[..][index]
994996
}
995997
}
998+
#[cfg(not(stage0))]
996999
#[stable(feature = "derefmut_for_string", since = "1.2.0")]
9971000
impl ops::IndexMut<ops::RangeFrom<usize>> for String {
9981001
#[inline]

branches/stable/src/libcore/array.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,8 @@
1111
//! Implementations of things like `Eq` for fixed-length arrays
1212
//! up to a certain length. Eventually we should able to generalize
1313
//! to all lengths.
14-
//!
15-
//! *[See also the array primitive type](../primitive.array.html).*
1614
15+
#![doc(primitive = "array")]
1716
#![unstable(feature = "fixed_size_array",
1817
reason = "traits and impls are better expressed through generic \
1918
integer constants")]

branches/stable/src/libcore/atomic.rs

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ use intrinsics;
7878
use cell::UnsafeCell;
7979

8080
use default::Default;
81-
use fmt;
8281

8382
/// A boolean type which can be safely shared between threads.
8483
#[stable(feature = "rust1", since = "1.0.0")]
@@ -1090,23 +1089,3 @@ pub fn fence(order: Ordering) {
10901089
}
10911090
}
10921091
}
1093-
1094-
macro_rules! impl_Debug {
1095-
($($t:ident)*) => ($(
1096-
#[stable(feature = "atomic_debug", since = "1.3.0")]
1097-
impl fmt::Debug for $t {
1098-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1099-
f.debug_tuple(stringify!($t)).field(&self.load(Ordering::SeqCst)).finish()
1100-
}
1101-
}
1102-
)*);
1103-
}
1104-
1105-
impl_Debug!{ AtomicUsize AtomicIsize AtomicBool }
1106-
1107-
#[stable(feature = "atomic_debug", since = "1.3.0")]
1108-
impl<T> fmt::Debug for AtomicPtr<T> {
1109-
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1110-
f.debug_tuple("AtomicPtr").field(&self.load(Ordering::SeqCst)).finish()
1111-
}
1112-
}

branches/stable/src/libcore/char.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
//! For more details, see ::rustc_unicode::char (a.k.a. std::char)
1414
1515
#![allow(non_snake_case)]
16+
#![doc(primitive = "char")]
1617
#![stable(feature = "core_char", since = "1.2.0")]
1718

1819
use iter::Iterator;

branches/stable/src/libcore/fmt/num.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
1313
// FIXME: #6220 Implement floating point formatting
1414

15+
#![allow(unsigned_negation)]
16+
1517
use prelude::*;
1618

1719
use fmt;

branches/stable/src/libcore/intrinsics.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -602,4 +602,10 @@ extern "rust-intrinsic" {
602602
/// Returns the value of the discriminant for the variant in 'v',
603603
/// cast to a `u64`; if `T` has no discriminant, returns 0.
604604
pub fn discriminant_value<T>(v: &T) -> u64;
605+
606+
/// Rust's "try catch" construct which invokes the function pointer `f` with
607+
/// the data pointer `data`, returning the exception payload if an exception
608+
/// is thrown (aka the thread panics).
609+
#[cfg(not(stage0))]
610+
pub fn try(f: fn(*mut u8), data: *mut u8) -> *mut u8;
605611
}

branches/stable/src/libcore/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,10 @@ pub mod str;
154154
pub mod hash;
155155
pub mod fmt;
156156

157+
#[doc(primitive = "bool")]
158+
mod bool {
159+
}
160+
157161
// note: does not need to be public
158162
mod tuple;
159163

branches/stable/src/libcore/num/f32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for 32-bits floats (`f32` type)
1212
13+
#![doc(primitive = "f32")]
1314
// FIXME: MIN_VALUE and MAX_VALUE literals are parsed as -inf and inf #14353
1415
#![allow(overflowing_literals)]
1516

branches/stable/src/libcore/num/f64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
//! Operations and constants for 64-bits floats (`f64` type)
1212
13+
#![doc(primitive = "f64")]
1314
// FIXME: MIN_VALUE and MAX_VALUE literals are parsed as -inf and inf #14353
1415
#![allow(overflowing_literals)]
1516

branches/stable/src/libcore/num/i16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for signed 16-bits integers (`i16` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "i16")]
1415

1516
int_module! { i16, 16 }

branches/stable/src/libcore/num/i32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for signed 32-bits integers (`i32` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "i32")]
1415

1516
int_module! { i32, 32 }

branches/stable/src/libcore/num/i64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for signed 64-bits integers (`i64` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "i64")]
1415

1516
int_module! { i64, 64 }

branches/stable/src/libcore/num/i8.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for signed 8-bits integers (`i8` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "i8")]
1415

1516
int_module! { i8, 8 }

branches/stable/src/libcore/num/isize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
//! Operations and constants for pointer-sized signed integers (`isize` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "isize")]
1415

1516
#[cfg(target_pointer_width = "32")]
1617
int_module! { isize, 32 }

branches/stable/src/libcore/num/u16.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for unsigned 16-bits integers (`u16` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "u16")]
1415

1516
uint_module! { u16, i16, 16 }

branches/stable/src/libcore/num/u32.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for unsigned 32-bits integers (`u32` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "u32")]
1415

1516
uint_module! { u32, i32, 32 }

branches/stable/src/libcore/num/u64.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for unsigned 64-bits integer (`u64` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "u64")]
1415

1516
uint_module! { u64, i64, 64 }

branches/stable/src/libcore/num/u8.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for unsigned 8-bits integers (`u8` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "u8")]
1415

1516
uint_module! { u8, i8, 8 }

branches/stable/src/libcore/num/usize.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
//! Operations and constants for pointer-sized unsigned integers (`usize` type)
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
14+
#![doc(primitive = "usize")]
1415

1516
uint_module! { usize, isize, ::isize::BITS }

branches/stable/src/libcore/ops.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -517,6 +517,7 @@ pub trait Neg {
517517
macro_rules! neg_impl_core {
518518
($id:ident => $body:expr, $($t:ty)*) => ($(
519519
#[stable(feature = "rust1", since = "1.0.0")]
520+
#[allow(unsigned_negation)]
520521
impl Neg for $t {
521522
#[stable(feature = "rust1", since = "1.0.0")]
522523
type Output = $t;

0 commit comments

Comments
 (0)