Skip to content

Commit 24cad34

Browse files
committed
---
yaml --- r: 277099 b: refs/heads/try c: eadd574 h: refs/heads/master i: 277097: d9f5464 277095: d58c518
1 parent db14475 commit 24cad34

File tree

62 files changed

+835
-154
lines changed

Some content is hidden

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

62 files changed

+835
-154
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 6dbb0e86aec11050480beb76eade6fb805010ba7
33
refs/heads/snap-stage3: 235d77457d80b549dad3ac36d94f235208a1eafb
4-
refs/heads/try: a40629d2c9aa2a3bed2e4edaafa2303eb4b19854
4+
refs/heads/try: eadd5748ce8da87370d34ad265a68a45a3ebcd5a
55
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
66
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
77
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/try/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@
7878
/stage3/
7979
/test/
8080
/tmp/
81+
/obj/
8182
TAGS
8283
TAGS.emacs
8384
TAGS.vi

branches/try/RELEASES.md

Lines changed: 290 additions & 2 deletions
Large diffs are not rendered by default.

branches/try/mk/main.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
######################################################################
1414

1515
# The version number
16-
CFG_RELEASE_NUM=1.9.0
16+
CFG_RELEASE_NUM=1.10.0
1717

1818
# An optional number to put after the label, e.g. '.2' -> '-beta.2'
1919
# NB Make sure it starts with a dot to conform to semver pre-release

branches/try/src/bootstrap/Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

branches/try/src/bootstrap/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ path = "rustdoc.rs"
2121

2222
[dependencies]
2323
build_helper = { path = "../build_helper" }
24-
cmake = "0.1.10"
24+
cmake = "0.1.17"
2525
filetime = "0.1"
2626
num_cpus = "0.2"
2727
toml = "0.1"

branches/try/src/bootstrap/build/config.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ use toml::{Parser, Decoder, Value};
3131
#[derive(Default)]
3232
pub struct Config {
3333
pub ccache: bool,
34+
pub ninja: bool,
3435
pub verbose: bool,
3536
pub submodules: bool,
3637
pub compiler_docs: bool,
@@ -107,6 +108,7 @@ struct Build {
107108
#[derive(RustcDecodable, Default)]
108109
struct Llvm {
109110
ccache: Option<bool>,
111+
ninja: Option<bool>,
110112
assertions: Option<bool>,
111113
optimize: Option<bool>,
112114
version_check: Option<bool>,
@@ -200,9 +202,9 @@ impl Config {
200202

201203
if let Some(ref llvm) = toml.llvm {
202204
set(&mut config.ccache, llvm.ccache);
205+
set(&mut config.ninja, llvm.ninja);
203206
set(&mut config.llvm_assertions, llvm.assertions);
204207
set(&mut config.llvm_optimize, llvm.optimize);
205-
set(&mut config.llvm_optimize, llvm.optimize);
206208
set(&mut config.llvm_version_check, llvm.version_check);
207209
set(&mut config.llvm_static_stdcpp, llvm.static_libstdcpp);
208210
}

branches/try/src/bootstrap/build/native.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ pub fn llvm(build: &Build, target: &str) {
4343

4444
// http://llvm.org/docs/CMake.html
4545
let mut cfg = cmake::Config::new(build.src.join("src/llvm"));
46+
if build.config.ninja {
47+
cfg.generator("Ninja");
48+
}
4649
cfg.target(target)
4750
.host(&build.config.build)
4851
.out_dir(&dst)

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ pub fn check(build: &mut Build) {
4848
}
4949
}
5050
need_cmd("cmake".as_ref());
51+
if build.config.ninja {
52+
need_cmd("ninja".as_ref())
53+
}
5154
break
5255
}
5356

branches/try/src/bootstrap/build/step.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,9 @@ fn top_level(build: &Build) -> Vec<Step> {
150150
src: Source::Llvm { _dummy: () },
151151
target: &build.config.build,
152152
};
153-
targets.push(t.doc(stage));
153+
if build.config.docs {
154+
targets.push(t.doc(stage));
155+
}
154156
for host in build.config.host.iter() {
155157
if !build.flags.host.contains(host) {
156158
continue
@@ -356,7 +358,9 @@ impl<'a> Step<'a> {
356358
let compiler = self.compiler(stage);
357359
for target in build.config.target.iter() {
358360
let target = self.target(target);
359-
base.push(target.dist_docs(stage));
361+
if build.config.docs {
362+
base.push(target.dist_docs(stage));
363+
}
360364
base.push(target.dist_std(compiler));
361365
}
362366
}

branches/try/src/libcollectionstest/str.rs

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

349+
350+
#[test]
351+
fn test_is_char_boundary() {
352+
let s = "ศไทย中华Việt Nam β-release 🐱123";
353+
assert!(s.is_char_boundary(0));
354+
assert!(s.is_char_boundary(s.len()));
355+
assert!(!s.is_char_boundary(s.len() + 1));
356+
for (i, ch) in s.char_indices() {
357+
// ensure character locations are boundaries and continuation bytes are not
358+
assert!(s.is_char_boundary(i), "{} is a char boundary in {:?}", i, s);
359+
for j in 1..ch.len_utf8() {
360+
assert!(!s.is_char_boundary(i + j),
361+
"{} should not be a char boundary in {:?}", i + j, s);
362+
}
363+
}
364+
}
349365
const LOREM_PARAGRAPH: &'static str = "\
350366
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse quis lorem sit amet dolor \
351367
ultricies condimentum. Praesent iaculis purus elit, ac malesuada quam malesuada in. Duis sed orci \

branches/try/src/libcore/macros.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ macro_rules! debug_assert_eq {
182182
/// fn write_to_file_using_match() -> Result<(), io::Error> {
183183
/// let mut file = try!(File::create("my_best_friends.txt"));
184184
/// match file.write_all(b"This is a list of my best friends.") {
185-
/// Ok(_) => (),
185+
/// Ok(v) => v,
186186
/// Err(e) => return Err(e),
187187
/// }
188188
/// println!("I wrote to the file");

branches/try/src/libcore/ops.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,6 +1539,11 @@ impl<Idx: PartialOrd<Idx>> Range<Idx> {
15391539
///
15401540
/// See the [`contains()`](#method.contains) method for its characterization.
15411541
///
1542+
/// Note: Currently, no overflow checking is done for the iterator
1543+
/// implementation; if you use an integer range and the integer overflows, it
1544+
/// might panic in debug mode or create an endless loop in release mode. This
1545+
/// overflow behavior might change in the future.
1546+
///
15421547
/// # Examples
15431548
///
15441549
/// ```

branches/try/src/librustc/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,4 +1543,5 @@ register_diagnostics! {
15431543
E0490, // a value of type `..` is borrowed for too long
15441544
E0491, // in type `..`, reference has a longer lifetime than the data it...
15451545
E0495, // cannot infer an appropriate lifetime due to conflicting requirements
1546+
E0524, // expected a closure that implements `..` but this closure only implements `..`
15461547
}

branches/try/src/librustc/middle/free_region.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ impl FreeRegionMap {
5959
ty::Predicate::Equate(..) |
6060
ty::Predicate::WellFormed(..) |
6161
ty::Predicate::ObjectSafe(..) |
62+
ty::Predicate::ClosureKind(..) |
6263
ty::Predicate::TypeOutlives(..) => {
6364
// No region bounds here
6465
}

branches/try/src/librustc/session/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@ pub fn rustc_short_optgroups() -> Vec<RustcOptGroup> {
892892
opt::multi_s("L", "", "Add a directory to the library search path",
893893
"[KIND=]PATH"),
894894
opt::multi_s("l", "", "Link the generated crate(s) to the specified native
895-
library NAME. The optional KIND can be one of,
895+
library NAME. The optional KIND can be one of
896896
static, dylib, or framework. If omitted, dylib is
897897
assumed.", "[KIND=]NAME"),
898898
opt::multi_s("", "crate-type", "Comma separated list of types of crates

branches/try/src/librustc/traits/error_reporting.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -495,6 +495,21 @@ pub fn report_selection_error<'a, 'tcx>(infcx: &InferCtxt<'a, 'tcx>,
495495
err.emit();
496496
}
497497

498+
ty::Predicate::ClosureKind(closure_def_id, kind) => {
499+
let found_kind = infcx.closure_kind(closure_def_id).unwrap();
500+
let closure_span = infcx.tcx.map.span_if_local(closure_def_id).unwrap();
501+
let mut err = struct_span_err!(
502+
infcx.tcx.sess, closure_span, E0524,
503+
"expected a closure that implements the `{}` trait, but this closure \
504+
only implements `{}`",
505+
kind,
506+
found_kind);
507+
err.span_note(
508+
obligation.cause.span,
509+
&format!("the requirement to implement `{}` derives from here", kind));
510+
err.emit();
511+
}
512+
498513
ty::Predicate::WellFormed(ty) => {
499514
// WF predicates cannot themselves make
500515
// errors. They can only block due to

branches/try/src/librustc/traits/fulfill.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -652,6 +652,21 @@ fn process_predicate1<'a,'tcx>(selcx: &mut SelectionContext<'a,'tcx>,
652652
}
653653
}
654654

655+
ty::Predicate::ClosureKind(closure_def_id, kind) => {
656+
match selcx.infcx().closure_kind(closure_def_id) {
657+
Some(closure_kind) => {
658+
if closure_kind.extends(kind) {
659+
Ok(Some(vec![]))
660+
} else {
661+
Err(CodeSelectionError(Unimplemented))
662+
}
663+
}
664+
None => {
665+
Ok(None)
666+
}
667+
}
668+
}
669+
655670
ty::Predicate::WellFormed(ty) => {
656671
match ty::wf::obligations(selcx.infcx(), obligation.cause.body_id,
657672
ty, obligation.cause.span) {

branches/try/src/librustc/traits/object_safety.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ pub fn supertraits_reference_self<'tcx>(tcx: &TyCtxt<'tcx>,
165165
ty::Predicate::ObjectSafe(..) |
166166
ty::Predicate::TypeOutlives(..) |
167167
ty::Predicate::RegionOutlives(..) |
168+
ty::Predicate::ClosureKind(..) |
168169
ty::Predicate::Equate(..) => {
169170
false
170171
}
@@ -207,6 +208,7 @@ fn generics_require_sized_self<'tcx>(tcx: &TyCtxt<'tcx>,
207208
ty::Predicate::RegionOutlives(..) |
208209
ty::Predicate::WellFormed(..) |
209210
ty::Predicate::ObjectSafe(..) |
211+
ty::Predicate::ClosureKind(..) |
210212
ty::Predicate::TypeOutlives(..) => {
211213
false
212214
}

0 commit comments

Comments
 (0)