Skip to content

Commit 2d61e72

Browse files
authored
Merge branch 'master' into map-split-perf-test
2 parents 8f0fce2 + ac8d1f7 commit 2d61e72

File tree

208 files changed

+2702
-1336
lines changed

Some content is hidden

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

208 files changed

+2702
-1336
lines changed

CONTRIBUTING.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ file. If you still have a `config.mk` file in your directory - from
142142
### Building
143143
[building]: #building
144144

145-
A default configuration shall use around 3.5 GB of disk space, whereas building a debug configuration may require more than 30 GB.
145+
A default configuration requires around 3.5 GB of disk space, whereas building a debug configuration may require more than 30 GB.
146146

147147
Dependencies
148148
- [build dependencies](README.md#building-from-source)

config.toml.example

+3-3
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,9 @@
301301
# desired in distributions, for example.
302302
#rpath = true
303303

304-
# Suppresses extraneous output from tests to ensure the output of the test
305-
# harness is relatively clean.
306-
#quiet-tests = false
304+
# Emits extraneous output from tests to ensure that failures of the test
305+
# harness are debuggable just from logfiles.
306+
#verbose-tests = false
307307

308308
# Flag indicating whether tests are compiled with optimizations (the -O flag) or
309309
# with debuginfo (the -g flag)

src/bootstrap/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ pub struct Config {
125125
// misc
126126
pub low_priority: bool,
127127
pub channel: String,
128-
pub quiet_tests: bool,
128+
pub verbose_tests: bool,
129129
pub test_miri: bool,
130130
pub save_toolstates: Option<PathBuf>,
131131
pub print_step_timings: bool,
@@ -301,7 +301,7 @@ struct Rust {
301301
ignore_git: Option<bool>,
302302
debug: Option<bool>,
303303
dist_src: Option<bool>,
304-
quiet_tests: Option<bool>,
304+
verbose_tests: Option<bool>,
305305
test_miri: Option<bool>,
306306
incremental: Option<bool>,
307307
save_toolstates: Option<String>,
@@ -528,7 +528,7 @@ impl Config {
528528
set(&mut config.backtrace, rust.backtrace);
529529
set(&mut config.channel, rust.channel.clone());
530530
set(&mut config.rust_dist_src, rust.dist_src);
531-
set(&mut config.quiet_tests, rust.quiet_tests);
531+
set(&mut config.verbose_tests, rust.verbose_tests);
532532
set(&mut config.test_miri, rust.test_miri);
533533
// in the case "false" is set explicitly, do not overwrite the command line args
534534
if let Some(true) = rust.incremental {

src/bootstrap/configure.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def v(*args):
4747
o("experimental-parallel-queries", "rust.experimental-parallel-queries", "build rustc with experimental parallelization")
4848
o("test-miri", "rust.test-miri", "run miri's test suite")
4949
o("debuginfo-tests", "rust.debuginfo-tests", "build tests with debugger metadata")
50-
o("quiet-tests", "rust.quiet-tests", "enable quieter output when running tests")
50+
o("verbose-tests", "rust.verbose-tests", "enable verbose output when running tests")
5151
o("ccache", "llvm.ccache", "invoke gcc/clang via ccache to reuse object files between builds")
5252
o("sccache", None, "invoke gcc/clang via sccache to reuse object files between builds")
5353
o("local-rust", None, "use an installed rustc rather than downloading a snapshot")

src/bootstrap/test.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ impl Step for Tidy {
632632
if !builder.config.vendor {
633633
cmd.arg("--no-vendor");
634634
}
635-
if builder.config.quiet_tests {
635+
if !builder.config.verbose_tests {
636636
cmd.arg("--quiet");
637637
}
638638

@@ -1086,7 +1086,7 @@ impl Step for Compiletest {
10861086
cmd.arg("--verbose");
10871087
}
10881088

1089-
if builder.config.quiet_tests {
1089+
if !builder.config.verbose_tests {
10901090
cmd.arg("--quiet");
10911091
}
10921092

@@ -1397,10 +1397,10 @@ fn markdown_test(builder: &Builder, compiler: Compiler, markdown: &Path) -> bool
13971397
let test_args = builder.config.cmd.test_args().join(" ");
13981398
cmd.arg("--test-args").arg(test_args);
13991399

1400-
if builder.config.quiet_tests {
1401-
try_run_quiet(builder, &mut cmd)
1402-
} else {
1400+
if builder.config.verbose_tests {
14031401
try_run(builder, &mut cmd)
1402+
} else {
1403+
try_run_quiet(builder, &mut cmd)
14041404
}
14051405
}
14061406

@@ -1632,7 +1632,7 @@ impl Step for Crate {
16321632
cargo.arg("--");
16331633
cargo.args(&builder.config.cmd.test_args());
16341634

1635-
if builder.config.quiet_tests {
1635+
if !builder.config.verbose_tests {
16361636
cargo.arg("--quiet");
16371637
}
16381638

@@ -1742,7 +1742,7 @@ impl Step for CrateRustdoc {
17421742
cargo.arg("--");
17431743
cargo.args(&builder.config.cmd.test_args());
17441744

1745-
if builder.config.quiet_tests {
1745+
if !builder.config.verbose_tests {
17461746
cargo.arg("--quiet");
17471747
}
17481748

src/ci/run.sh

+2-4
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ fi
2727
ci_dir=`cd $(dirname $0) && pwd`
2828
source "$ci_dir/shared.sh"
2929

30-
if [ "$TRAVIS" == "true" ] && [ "$TRAVIS_BRANCH" != "auto" ]; then
31-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-quiet-tests"
32-
else
33-
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings"
30+
if [ "$TRAVIS" != "true" ] || [ "$TRAVIS_BRANCH" == "auto" ]; then
31+
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set build.print-step-timings --enable-verbose-tests"
3432
fi
3533

3634
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --enable-sccache"

src/doc/book

Submodule book updated 35 files

src/doc/nomicon

src/doc/reference

src/liballoc/alloc.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ unsafe fn exchange_malloc(size: usize, align: usize) -> *mut u8 {
158158
if !ptr.is_null() {
159159
ptr
160160
} else {
161-
oom(layout)
161+
handle_alloc_error(layout)
162162
}
163163
}
164164
}
@@ -184,13 +184,13 @@ pub(crate) unsafe fn box_free<T: ?Sized>(ptr: Unique<T>) {
184184
///
185185
/// The default behavior of this function is to print a message to standard error
186186
/// and abort the process.
187-
/// It can be replaced with [`set_oom_hook`] and [`take_oom_hook`].
187+
/// It can be replaced with [`set_alloc_error_hook`] and [`take_alloc_error_hook`].
188188
///
189-
/// [`set_oom_hook`]: ../../std/alloc/fn.set_oom_hook.html
190-
/// [`take_oom_hook`]: ../../std/alloc/fn.take_oom_hook.html
189+
/// [`set_alloc_error_hook`]: ../../std/alloc/fn.set_alloc_error_hook.html
190+
/// [`take_alloc_error_hook`]: ../../std/alloc/fn.take_alloc_error_hook.html
191191
#[stable(feature = "global_alloc", since = "1.28.0")]
192192
#[rustc_allocator_nounwind]
193-
pub fn oom(layout: Layout) -> ! {
193+
pub fn handle_alloc_error(layout: Layout) -> ! {
194194
#[allow(improper_ctypes)]
195195
extern "Rust" {
196196
#[lang = "oom"]
@@ -204,14 +204,14 @@ mod tests {
204204
extern crate test;
205205
use self::test::Bencher;
206206
use boxed::Box;
207-
use alloc::{Global, Alloc, Layout, oom};
207+
use alloc::{Global, Alloc, Layout, handle_alloc_error};
208208

209209
#[test]
210210
fn allocate_zeroed() {
211211
unsafe {
212212
let layout = Layout::from_size_align(1024, 1).unwrap();
213213
let ptr = Global.alloc_zeroed(layout.clone())
214-
.unwrap_or_else(|_| oom(layout));
214+
.unwrap_or_else(|_| handle_alloc_error(layout));
215215

216216
let mut i = ptr.cast::<u8>().as_ptr();
217217
let end = i.offset(layout.size() as isize);

src/liballoc/arc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ use core::hash::{Hash, Hasher};
3232
use core::{isize, usize};
3333
use core::convert::From;
3434

35-
use alloc::{Global, Alloc, Layout, box_free, oom};
35+
use alloc::{Global, Alloc, Layout, box_free, handle_alloc_error};
3636
use boxed::Box;
3737
use string::String;
3838
use vec::Vec;
@@ -554,7 +554,7 @@ impl<T: ?Sized> Arc<T> {
554554
let layout = Layout::for_value(&*fake_ptr);
555555

556556
let mem = Global.alloc(layout)
557-
.unwrap_or_else(|_| oom(layout));
557+
.unwrap_or_else(|_| handle_alloc_error(layout));
558558

559559
// Initialize the real ArcInner
560560
let inner = set_data_ptr(ptr as *mut T, mem.as_ptr() as *mut u8) as *mut ArcInner<T>;

src/liballoc/raw_vec.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use core::ops::Drop;
1414
use core::ptr::{self, NonNull, Unique};
1515
use core::slice;
1616

17-
use alloc::{Alloc, Layout, Global, oom};
17+
use alloc::{Alloc, Layout, Global, handle_alloc_error};
1818
use alloc::CollectionAllocErr;
1919
use alloc::CollectionAllocErr::*;
2020
use boxed::Box;
@@ -104,7 +104,7 @@ impl<T, A: Alloc> RawVec<T, A> {
104104
};
105105
match result {
106106
Ok(ptr) => ptr.cast(),
107-
Err(_) => oom(layout),
107+
Err(_) => handle_alloc_error(layout),
108108
}
109109
};
110110

@@ -319,7 +319,9 @@ impl<T, A: Alloc> RawVec<T, A> {
319319
new_size);
320320
match ptr_res {
321321
Ok(ptr) => (new_cap, ptr.cast().into()),
322-
Err(_) => oom(Layout::from_size_align_unchecked(new_size, cur.align())),
322+
Err(_) => handle_alloc_error(
323+
Layout::from_size_align_unchecked(new_size, cur.align())
324+
),
323325
}
324326
}
325327
None => {
@@ -328,7 +330,7 @@ impl<T, A: Alloc> RawVec<T, A> {
328330
let new_cap = if elem_size > (!0) / 8 { 1 } else { 4 };
329331
match self.a.alloc_array::<T>(new_cap) {
330332
Ok(ptr) => (new_cap, ptr.into()),
331-
Err(_) => oom(Layout::array::<T>(new_cap).unwrap()),
333+
Err(_) => handle_alloc_error(Layout::array::<T>(new_cap).unwrap()),
332334
}
333335
}
334336
};
@@ -611,7 +613,9 @@ impl<T, A: Alloc> RawVec<T, A> {
611613
old_layout,
612614
new_size) {
613615
Ok(p) => self.ptr = p.cast().into(),
614-
Err(_) => oom(Layout::from_size_align_unchecked(new_size, align)),
616+
Err(_) => handle_alloc_error(
617+
Layout::from_size_align_unchecked(new_size, align)
618+
),
615619
}
616620
}
617621
self.cap = amount;
@@ -673,7 +677,7 @@ impl<T, A: Alloc> RawVec<T, A> {
673677
};
674678

675679
match (&res, fallibility) {
676-
(Err(AllocErr), Infallible) => oom(new_layout),
680+
(Err(AllocErr), Infallible) => handle_alloc_error(new_layout),
677681
_ => {}
678682
}
679683

src/liballoc/rc.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ use core::ops::CoerceUnsized;
259259
use core::ptr::{self, NonNull};
260260
use core::convert::From;
261261

262-
use alloc::{Global, Alloc, Layout, box_free, oom};
262+
use alloc::{Global, Alloc, Layout, box_free, handle_alloc_error};
263263
use string::String;
264264
use vec::Vec;
265265

@@ -662,7 +662,7 @@ impl<T: ?Sized> Rc<T> {
662662
let layout = Layout::for_value(&*fake_ptr);
663663

664664
let mem = Global.alloc(layout)
665-
.unwrap_or_else(|_| oom(layout));
665+
.unwrap_or_else(|_| handle_alloc_error(layout));
666666

667667
// Initialize the real RcBox
668668
let inner = set_data_ptr(ptr as *mut T, mem.as_ptr() as *mut u8) as *mut RcBox<T>;

0 commit comments

Comments
 (0)