Skip to content

Commit a97f7ca

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 272888 b: refs/heads/beta c: 210dd61 h: refs/heads/master
1 parent ec688b5 commit a97f7ca

Some content is hidden

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

91 files changed

+891
-1253
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: a9ffe67f98366c58f13e89851d025e8e063f0bb2
26+
refs/heads/beta: 210dd611aa1bd80ed2f4e663b3c4b87b3cea069a
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ build.
7777
7878
Download [MinGW from
7979
here](http://mingw-w64.org/doku.php/download/mingw-builds), and choose the
80-
`threads=win32,exceptions=dwarf/seh` flavor when installing. Also, make sure to install to a path without spaces in it. After installing,
80+
`threads=win32,exceptions=dwarf/seh` flavor when installing. After installing,
8181
add its `bin` directory to your `PATH`. This is due to [#28260](https://github.com/rust-lang/rust/issues/28260), in the future,
8282
installing from pacman should be just fine.
8383

branches/beta/mk/crates.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ DEPS_serialize := std log
8787
DEPS_term := std log
8888
DEPS_test := std getopts serialize rbml term native:rust_test_helpers
8989

90-
DEPS_syntax := std term serialize log arena libc rustc_bitflags rustc_unicode
90+
DEPS_syntax := std term serialize log arena libc rustc_bitflags
9191
DEPS_syntax_ext := syntax fmt_macros
9292

9393
DEPS_rustc := syntax fmt_macros flate arena serialize getopts rbml rustc_front\

branches/beta/mk/rt.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ COMPRT_AR_$(1) := $$(AR_$(1))
253253
# We chomp -Werror here because GCC warns about the type signature of
254254
# builtins not matching its own and the build fails. It's a bit hacky,
255255
# but what can we do, we're building libclang-rt using GCC ......
256-
COMPRT_CFLAGS_$(1) := $$(CFG_GCCISH_CFLAGS_$(1)) -Wno-error -std=c99
256+
COMPRT_CFLAGS_$(1) := $$(filter-out -Werror -Werror=*,$$(CFG_GCCISH_CFLAGS_$(1))) -std=c99
257257

258258
# FreeBSD Clang's packaging is problematic; it doesn't copy unwind.h to
259259
# the standard include directory. This should really be in our changes to
@@ -361,7 +361,7 @@ $$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
361361
CC="$$(CC_$(1))" \
362362
AR="$$(AR_$(1))" \
363363
RANLIB="$$(AR_$(1)) s" \
364-
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1)) -Wno-error -fno-stack-protector" \
364+
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) -fno-stack-protector" \
365365
$(S)src/libbacktrace/configure --build=$(CFG_GNU_TRIPLE_$(CFG_BUILD)) --host=$(CFG_GNU_TRIPLE_$(1)))
366366
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
367367
$$(BACKTRACE_BUILD_DIR_$(1))/config.h

branches/beta/src/bootstrap/build/compile.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -83,19 +83,6 @@ pub fn std_link(build: &Build,
8383
libdir.join(staticlib("compiler-rt", target))));
8484
}
8585
add_to_sysroot(&out_dir, &libdir);
86-
87-
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
88-
copy_third_party_objects(build, target, &libdir);
89-
}
90-
}
91-
92-
/// Copies the crt(1,i,n).o startup objects
93-
///
94-
/// Only required for musl targets that statically link to libc
95-
fn copy_third_party_objects(build: &Build, target: &str, into: &Path) {
96-
for &obj in &["crt1.o", "crti.o", "crtn.o"] {
97-
t!(fs::copy(compiler_file(build.cc(target), obj), into.join(obj)));
98-
}
9986
}
10087

10188
/// Build and prepare startup objects like rsbegin.o and rsend.o

branches/beta/src/bootstrap/build/sanity.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ pub fn check(build: &mut Build) {
7979
}
8080

8181
// Make sure musl-root is valid if specified
82-
if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
82+
if target.contains("musl") && target.contains("x86_64") {
8383
match build.config.musl_root {
8484
Some(ref root) => {
8585
if fs::metadata(root.join("lib/libc.a")).is_err() {

branches/beta/src/doc/reference.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,10 +379,6 @@ Examples of integer literals of various forms:
379379
0usize; // type usize
380380
```
381381

382-
Note that the Rust syntax considers `-1i8` as an application of the [unary minus
383-
operator](#unary-operator-expressions) to an integer literal `1i8`, rather than
384-
a single integer literal.
385-
386382
##### Floating-point literals
387383

388384
A _floating-point literal_ has one of two forms:
@@ -2780,9 +2776,7 @@ Rust defines the following unary operators. They are all written as prefix opera
27802776
before the expression they apply to.
27812777

27822778
* `-`
2783-
: Negation. Signed integer types and floating-point types support negation. It
2784-
is an error to apply negation to unsigned types; for example, the compiler
2785-
rejects `-1u32`.
2779+
: Negation. May only be applied to numeric types.
27862780
* `*`
27872781
: Dereference. When applied to a [pointer](#pointer-types) it denotes the
27882782
pointed-to location. For pointers to mutable locations, the resulting

branches/beta/src/etc/platform-intrinsics/generator.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -691,7 +691,7 @@ def parse_args():
691691
parser.add_argument('-o', '--out', type=argparse.FileType('w'), default=sys.stdout,
692692
help = 'File to output to (default stdout).')
693693
parser.add_argument('-i', '--info', type=argparse.FileType('r'),
694-
help = 'File containing platform specific information to merge into '
694+
help = 'File containing platform specific information to merge into'
695695
'the input files\' header.')
696696
parser.add_argument('in_', metavar="FILE", type=argparse.FileType('r'), nargs='+',
697697
help = 'JSON files to load')
@@ -735,12 +735,12 @@ def open(self, platform):
735735
736736
use {{Intrinsic, i, i_, u, u_, f, v, v_, agg, p, void}};
737737
use IntrinsicDef::Named;
738-
use rustc::middle::ty::TyCtxt;
738+
use rustc::middle::ty;
739739
740740
// The default inlining settings trigger a pathological behaviour in
741741
// LLVM, which causes makes compilation very slow. See #28273.
742742
#[inline(never)]
743-
pub fn find<'tcx>(_tcx: &TyCtxt<'tcx>, name: &str) -> Option<Intrinsic> {{
743+
pub fn find<'tcx>(_tcx: &ty::ctxt<'tcx>, name: &str) -> Option<Intrinsic> {{
744744
if !name.starts_with("{0}") {{ return None }}
745745
Some(match &name["{0}".len()..] {{'''.format(platform.intrinsic_prefix())
746746

branches/beta/src/etc/platform-intrinsics/x86/fma.json

Lines changed: 0 additions & 47 deletions
This file was deleted.

branches/beta/src/etc/unicode.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
398398
derived = load_properties("DerivedCoreProperties.txt", want_derived)
399399
scripts = load_properties("Scripts.txt", [])
400400
props = load_properties("PropList.txt",
401-
["White_Space", "Join_Control", "Noncharacter_Code_Point", "Pattern_White_Space"])
401+
["White_Space", "Join_Control", "Noncharacter_Code_Point"])
402402
norm_props = load_properties("DerivedNormalizationProps.txt",
403403
["Full_Composition_Exclusion"])
404404

@@ -408,7 +408,7 @@ def emit_norm_module(f, canon, compat, combine, norm_props):
408408
# category tables
409409
for (name, cat, pfuns) in ("general_category", gencats, ["N", "Cc"]), \
410410
("derived_property", derived, want_derived), \
411-
("property", props, ["White_Space", "Pattern_White_Space"]):
411+
("property", props, ["White_Space"]):
412412
emit_property_module(rf, name, cat, pfuns)
413413

414414
# normalizations and conversions module

branches/beta/src/liballoc_jemalloc/build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ fn main() {
111111
println!("cargo:rustc-link-search=native={}/lib", build_dir.display());
112112
if target.contains("android") {
113113
println!("cargo:rustc-link-lib=gcc");
114-
} else if !target.contains("windows") && !target.contains("musl") {
114+
} else if !target.contains("windows") {
115115
println!("cargo:rustc-link-lib=pthread");
116116
}
117117
}

branches/beta/src/libcollections/str.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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 slices
1212
//!
1313
//! *[See also the `str` primitive type](../primitive.str.html).*
1414

branches/beta/src/libcollectionstest/str.rs

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -346,26 +346,6 @@ fn test_slice_fail() {
346346
&"中华Việt Nam"[0..2];
347347
}
348348

349-
const LOREM_PARAGRAPH: &'static str = "\
350-
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse quis lorem sit amet dolor \
351-
ultricies condimentum. Praesent iaculis purus elit, ac malesuada quam malesuada in. Duis sed orci \
352-
eros. Suspendisse sit amet magna mollis, mollis nunc luctus, imperdiet mi. Integer fringilla non \
353-
sem ut lacinia. Fusce varius tortor a risus porttitor hendrerit. Morbi mauris dui, ultricies nec \
354-
tempus vel, gravida nec quam.";
355-
356-
// check the panic includes the prefix of the sliced string
357-
#[test]
358-
#[should_panic(expected="Lorem ipsum dolor sit amet")]
359-
fn test_slice_fail_truncated_1() {
360-
&LOREM_PARAGRAPH[..1024];
361-
}
362-
// check the truncation in the panic message
363-
#[test]
364-
#[should_panic(expected="luctus, im`[...] do not lie on character boundary")]
365-
fn test_slice_fail_truncated_2() {
366-
&LOREM_PARAGRAPH[..1024];
367-
}
368-
369349
#[test]
370350
fn test_slice_from() {
371351
assert_eq!(&"abcd"[0..], "abcd");

branches/beta/src/libcore/clone.rs

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

11-
//! The `Clone` trait for types that cannot be 'implicitly copied'.
11+
//! The `Clone` trait for types that cannot be 'implicitly copied'
1212
//!
1313
//! In Rust, some simple types are "implicitly copyable" and when you
1414
//! assign them or pass them as arguments, the receiver will get a copy,

branches/beta/src/libcore/fmt/mod.rs

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

11-
//! Utilities for formatting and printing strings.
11+
//! Utilities for formatting and printing strings
1212
1313
#![stable(feature = "rust1", since = "1.0.0")]
1414

branches/beta/src/libcore/iter.rs

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

11-
//! Composable external iteration.
11+
//! Composable external iteration
1212
//!
1313
//! If you've found yourself with a collection of some kind, and needed to
1414
//! perform an operation on the elements of said collection, you'll quickly run

branches/beta/src/libcore/mem.rs

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

11-
//! Basic functions for dealing with memory.
11+
//! Basic functions for dealing with memory
1212
//!
1313
//! This module contains functions for querying the size and alignment of
1414
//! types, initializing and manipulating memory.

branches/beta/src/libcore/ops.rs

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

11-
//! Overloadable operators.
11+
//! Overloadable operators
1212
//!
1313
//! Implementing these traits allows you to get an effect similar to
1414
//! overloading operators.

branches/beta/src/libcore/option.rs

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

11-
//! Optional values.
11+
//! Optional values
1212
//!
1313
//! Type `Option` represents an optional value: every `Option`
1414
//! is either `Some` and contains a value, or `None`, and

branches/beta/src/libcore/ptr.rs

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

1111
// FIXME: talk about offset, copy_memory, copy_nonoverlapping_memory
1212

13-
//! Raw, unsafe pointers, `*const T`, and `*mut T`.
13+
//! Raw, unsafe pointers, `*const T`, and `*mut T`
1414
//!
1515
//! *[See also the pointer primitive types](../../std/primitive.pointer.html).*
1616

branches/beta/src/libcore/result.rs

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

11-
//! Error handling with the `Result` type.
11+
//! Error handling with the `Result` type
1212
//!
1313
//! `Result<T, E>` is the type used for returning and propagating
1414
//! errors. It is an enum with the variants, `Ok(T)`, representing

branches/beta/src/libcore/str/mod.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1645,30 +1645,12 @@ pub trait StrExt {
16451645
fn parse<T: FromStr>(&self) -> Result<T, T::Err>;
16461646
}
16471647

1648-
// truncate `&str` to length at most equal to `max`
1649-
// return `true` if it were truncated, and the new str.
1650-
fn truncate_to_char_boundary(s: &str, mut max: usize) -> (bool, &str) {
1651-
if max >= s.len() {
1652-
(false, s)
1653-
} else {
1654-
while !s.is_char_boundary(max) {
1655-
max -= 1;
1656-
}
1657-
(true, &s[..max])
1658-
}
1659-
}
1660-
16611648
#[inline(never)]
16621649
#[cold]
16631650
fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! {
1664-
const MAX_DISPLAY_LENGTH: usize = 256;
1665-
let (truncated, s) = truncate_to_char_boundary(s, MAX_DISPLAY_LENGTH);
1666-
let ellipsis = if truncated { "[...]" } else { "" };
1667-
1668-
assert!(begin <= end, "begin <= end ({} <= {}) when slicing `{}`{}",
1669-
begin, end, s, ellipsis);
1670-
panic!("index {} and/or {} in `{}`{} do not lie on character boundary",
1671-
begin, end, s, ellipsis);
1651+
assert!(begin <= end);
1652+
panic!("index {} and/or {} in `{}` do not lie on character boundary",
1653+
begin, end, s);
16721654
}
16731655

16741656
#[stable(feature = "core", since = "1.6.0")]

branches/beta/src/liblibc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Subproject commit e19309c8b4e8bbd11f4d84dfffd75e3d1ac477fe
1+
Subproject commit 07a92067930670473dc53300dfdda23ff486344d

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,10 @@ fn check_arms(cx: &MatchCheckCtxt,
344344
hir::MatchSource::Normal => {
345345
span_err!(cx.tcx.sess, pat.span, E0001, "unreachable pattern")
346346
},
347+
348+
hir::MatchSource::TryDesugar => {
349+
cx.tcx.sess.span_bug(pat.span, "unreachable try pattern")
350+
},
347351
}
348352
}
349353
Useful => (),
@@ -1047,7 +1051,10 @@ fn is_refutable<A, F>(cx: &MatchCheckCtxt, pat: &Pat, refutable: F) -> Option<A>
10471051
{
10481052
let pats = Matrix(vec!(vec!(pat)));
10491053
match is_useful(cx, &pats, &[DUMMY_WILD_PAT], ConstructWitness) {
1050-
UsefulWithWitness(pats) => Some(refutable(&pats[0])),
1054+
UsefulWithWitness(pats) => {
1055+
assert_eq!(pats.len(), 1);
1056+
Some(refutable(&pats[0]))
1057+
},
10511058
NotUseful => None,
10521059
Useful => unreachable!()
10531060
}

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,9 @@ impl LanguageItems {
120120

121121
pub fn fn_trait_kind(&self, id: DefId) -> Option<ty::ClosureKind> {
122122
let def_id_kinds = [
123-
(self.fn_trait(), ty::ClosureKind::Fn),
124-
(self.fn_mut_trait(), ty::ClosureKind::FnMut),
125-
(self.fn_once_trait(), ty::ClosureKind::FnOnce),
123+
(self.fn_trait(), ty::FnClosureKind),
124+
(self.fn_mut_trait(), ty::FnMutClosureKind),
125+
(self.fn_once_trait(), ty::FnOnceClosureKind),
126126
];
127127

128128
for &(opt_def_id, kind) in &def_id_kinds {

0 commit comments

Comments
 (0)