Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 346aec9

Browse files
committed
Auto merge of rust-lang#74235 - Manishearth:rollup-bgs3q14, r=Manishearth
Rollup of 19 pull requests Successful merges: - rust-lang#71322 (Accept tuple.0.0 as tuple indexing (take 2)) - rust-lang#72303 (Add core::future::{poll_fn, PollFn}) - rust-lang#73862 (Stabilize casts and coercions to `&[T]` in const fn) - rust-lang#73887 (stabilize const mem::forget) - rust-lang#73989 (adjust ub-enum test to be endianess-independent) - rust-lang#74045 (Explain effects of debugging options from config.toml) - rust-lang#74076 (Add `read_exact_at` and `write_all_at` to WASI's `FileExt`) - rust-lang#74099 (Add VecDeque::range* methods) - rust-lang#74100 (Use str::strip* in bootstrap) - rust-lang#74103 (Only add CFGuard on `windows-msvc` targets) - rust-lang#74109 (Only allow `repr(i128/u128)` on enum) - rust-lang#74122 (Start-up clean-up) - rust-lang#74125 (Correctly mark the ending span of a match arm) - rust-lang#74127 (Avoid "whitelist") - rust-lang#74129 (:arrow_up: rust-analyzer) - rust-lang#74135 (Update books) - rust-lang#74145 (Update rust-installer to latest version) - rust-lang#74161 (Fix disabled dockerfiles) - rust-lang#74162 (take self by value in ToPredicate) Failed merges: r? @ghost
2 parents daecab3 + 79fc386 commit 346aec9

File tree

130 files changed

+1599
-596
lines changed

Some content is hidden

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

130 files changed

+1599
-596
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,8 +1366,8 @@ checksum = "7e81a7c05f79578dbc15793d8b619db9ba32b4577003ef3af1a91c416798c58d"
13661366
name = "installer"
13671367
version = "0.0.0"
13681368
dependencies = [
1369+
"anyhow",
13691370
"clap",
1370-
"failure",
13711371
"flate2",
13721372
"lazy_static",
13731373
"num_cpus",

config.toml.example

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,9 @@
318318
#codegen-units-std = 1
319319

320320
# Whether or not debug assertions are enabled for the compiler and standard
321-
# library.
321+
# library. Debug assertions control the maximum log level used by rustc. When
322+
# enabled calls to `trace!` and `debug!` macros are preserved in the compiled
323+
# binary, otherwise they are omitted.
322324
#
323325
# Defaults to rust.debug value
324326
#debug-assertions = false
@@ -331,7 +333,9 @@
331333

332334
# Debuginfo level for most of Rust code, corresponds to the `-C debuginfo=N` option of `rustc`.
333335
# `0` - no debug info
334-
# `1` - line tables only
336+
# `1` - line tables only - sufficient to generate backtraces that include line
337+
# information and inlined functions, set breakpoints at source code
338+
# locations, and step through execution in a debugger.
335339
# `2` - full debug info with variable and type information
336340
# Can be overridden for specific subsets of Rust code (rustc, std or tools).
337341
# Debuginfo for tests run with compiletest is not controlled by this option

src/bootstrap/compile.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -963,10 +963,11 @@ pub fn run_cargo(
963963
.collect::<Vec<_>>();
964964
for (prefix, extension, expected_len) in toplevel {
965965
let candidates = contents.iter().filter(|&&(_, ref filename, ref meta)| {
966-
filename.starts_with(&prefix[..])
967-
&& filename[prefix.len()..].starts_with('-')
968-
&& filename.ends_with(&extension[..])
969-
&& meta.len() == expected_len
966+
meta.len() == expected_len
967+
&& filename
968+
.strip_prefix(&prefix[..])
969+
.map(|s| s.starts_with('-') && s.ends_with(&extension[..]))
970+
.unwrap_or(false)
970971
});
971972
let max = candidates
972973
.max_by_key(|&&(_, _, ref metadata)| FileTime::from_last_modification_time(metadata));

src/bootstrap/doc.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,8 +439,6 @@ impl Step for Std {
439439
builder.cargo(compiler, Mode::Std, SourceType::InTree, target, "rustdoc");
440440
compile::std_cargo(builder, target, compiler.stage, &mut cargo);
441441

442-
// Keep a whitelist so we do not build internal stdlib crates, these will be
443-
// build by the rustc step later if enabled.
444442
cargo.arg("-p").arg(package);
445443
// Create all crate output directories first to make sure rustdoc uses
446444
// relative links.
@@ -460,6 +458,10 @@ impl Step for Std {
460458

461459
builder.run(&mut cargo.into());
462460
};
461+
// Only build the following crates. While we could just iterate over the
462+
// folder structure, that would also build internal crates that we do
463+
// not want to show in documentation. These crates will later be visited
464+
// by the rustc step, so internal documentation will show them.
463465
let krates = ["alloc", "core", "std", "proc_macro", "test"];
464466
for krate in &krates {
465467
run_cargo_rustdoc_for(krate);

src/bootstrap/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -436,10 +436,9 @@ impl Build {
436436
output(Command::new(&build.initial_rustc).arg("--version").arg("--verbose"));
437437
let local_release = local_version_verbose
438438
.lines()
439-
.filter(|x| x.starts_with("release:"))
439+
.filter_map(|x| x.strip_prefix("release:"))
440440
.next()
441441
.unwrap()
442-
.trim_start_matches("release:")
443442
.trim();
444443
let my_version = channel::CFG_RELEASE_NUM;
445444
if local_release.split('.').take(2).eq(my_version.split('.').take(2)) {
@@ -1089,10 +1088,10 @@ impl Build {
10891088
let toml_file_name = self.src.join(&format!("src/tools/{}/Cargo.toml", package));
10901089
let toml = t!(fs::read_to_string(&toml_file_name));
10911090
for line in toml.lines() {
1092-
let prefix = "version = \"";
1093-
let suffix = "\"";
1094-
if line.starts_with(prefix) && line.ends_with(suffix) {
1095-
return line[prefix.len()..line.len() - suffix.len()].to_string();
1091+
if let Some(stripped) =
1092+
line.strip_prefix("version = \"").and_then(|s| s.strip_suffix("\""))
1093+
{
1094+
return stripped.to_owned();
10961095
}
10971096
}
10981097

src/ci/docker/host-x86_64/disabled/riscv64gc-linux/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ RUN curl https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.6.16.tar.xz | tar
4040
cp linux.config linux-5.6.16/.config && \
4141
cd /build/linux-5.6.16 && \
4242
make olddefconfig && \
43-
make -j$(nproc) vmlinux
44-
RUN cp linux-5.6.16/vmlinux /tmp
45-
RUN rm -rf linux-5.6.16
43+
make -j$(nproc) vmlinux && \
44+
cp vmlinux /tmp && \
45+
rm -rf linux-5.6.16
4646

4747
# Compile an instance of busybox as this provides a lightweight system and init
4848
# binary which we will boot into. Only trick here is configuring busybox to

src/ci/docker/run.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
119119
exit 1
120120
fi
121121
# Transform changes the context of disabled Dockerfiles to match the enabled ones
122-
tar --transform 's#^./disabled/#./#' -C $docker_dir -c . | docker \
122+
tar --transform 's#disabled/#./#' -C $script_dir -c . | docker \
123123
build \
124124
--rm \
125125
-t rust-ci \
126-
-f "$image/Dockerfile" \
126+
-f "host-$(uname -m)/$image/Dockerfile" \
127127
-
128128
else
129129
echo Invalid image: $image

0 commit comments

Comments
 (0)