Skip to content

Commit 2174bd9

Browse files
committed
Auto merge of #32960 - steveklabnik:rollup, r=steveklabnik
Rollup of 15 pull requests - Successful merges: #32646, #32855, #32856, #32865, #32868, #32869, #32876, #32884, #32885, #32893, #32894, #32932, #32937, #32940, #32941 - Failed merges: #32912
2 parents 2b5d24a + 7e2302b commit 2174bd9

File tree

23 files changed

+77
-30
lines changed

23 files changed

+77
-30
lines changed

RELEASES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,7 @@ Compatibility Notes
418418
numbers [no longer return platform-specific types][1.8r], but
419419
instead return widened integers. [RFC 1415].
420420
* [Modules sourced from the filesystem cannot appear within arbitrary
421-
blocks, but only within other modules][1.8m].
421+
blocks, but only within other modules][1.8mf].
422422
* [`--cfg` compiler flags are parsed strictly as identifiers][1.8c].
423423
* On Unix, [stack overflow triggers a runtime abort instead of a
424424
SIGSEGV][1.8so].
@@ -448,7 +448,7 @@ Compatibility Notes
448448
[1.8h]: https://github.com/rust-lang/rust/pull/31460
449449
[1.8l]: https://github.com/rust-lang/rust/pull/31668
450450
[1.8m]: https://github.com/rust-lang/rust/pull/31020
451-
[1.8m]: https://github.com/rust-lang/rust/pull/31534
451+
[1.8mf]: https://github.com/rust-lang/rust/pull/31534
452452
[1.8mp]: https://github.com/rust-lang/rust/pull/30894
453453
[1.8mr]: https://users.rust-lang.org/t/multirust-0-8-with-cross-std-installation/4901
454454
[1.8ms]: https://github.com/rust-lang/rust/pull/30448

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

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.

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"

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
}

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)

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

src/doc/book/guessing-game.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -988,8 +988,7 @@ fn main() {
988988
989989
# Complete!
990990
991-
At this point, you have successfully built the Guessing Game! Congratulations!
991+
This project showed you a lot: `let`, `match`, methods, associated
992+
functions, using external crates, and more.
992993
993-
This first project showed you a lot: `let`, `match`, methods, associated
994-
functions, using external crates, and more. Our next project will show off
995-
even more.
994+
At this point, you have successfully built the Guessing Game! Congratulations!

src/libcollections/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,9 +634,9 @@ impl str {
634634
/// Basic usage:
635635
///
636636
/// ```
637-
/// let s = "Per Martin-Löf";
637+
/// let mut s = "Per Martin-Löf".to_string();
638638
///
639-
/// let (first, last) = s.split_at(3);
639+
/// let (first, last) = s.split_at_mut(3);
640640
///
641641
/// assert_eq!("Per", first);
642642
/// assert_eq!(" Martin-Löf", last);

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 \

0 commit comments

Comments
 (0)