Skip to content

Commit c59bea3

Browse files
committed
Auto merge of #64626 - Centril:rollup-elbvzz0, r=Centril
Rollup of 8 pull requests Successful merges: - #64136 (Document From trait for LhsExpr in parser) - #64342 (factor out pluralisation remains after #64280) - #64387 (Fix redundant semicolon lint interaction with proc macro attributes) - #64498 (When possible point at argument causing item obligation failure) - #64615 (rustbuild: Turn down compression on exe installers) - #64617 (rustbuild: Turn down compression on msi installers) - #64618 (rustbuild: Improve output of `dist` step) - #64621 (Add Compatibility Notes to RELEASES.md for 1.38.0) Failed merges: r? @ghost
2 parents ea3ba36 + 5c610c8 commit c59bea3

File tree

91 files changed

+685
-442
lines changed

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

+685
-442
lines changed

RELEASES.md

+9
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,13 @@ Misc
6868
- [`rustc` will now warn about some incorrect uses of
6969
`mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346]
7070

71+
Compatibility Notes
72+
-------------------
73+
- Unfortunately the [`x86_64-unknown-uefi` platform can not be built][62785]
74+
with rustc 1.39.0.
75+
- The [`armv7-unknown-linux-gnueabihf` platform is also known to have
76+
issues][62896] for certain crates such as libc.
77+
7178
[60260]: https://github.com/rust-lang/rust/pull/60260/
7279
[61457]: https://github.com/rust-lang/rust/pull/61457/
7380
[61491]: https://github.com/rust-lang/rust/pull/61491/
@@ -79,7 +86,9 @@ Misc
7986
[62735]: https://github.com/rust-lang/rust/pull/62735/
8087
[62766]: https://github.com/rust-lang/rust/pull/62766/
8188
[62784]: https://github.com/rust-lang/rust/pull/62784/
89+
[62785]: https://github.com/rust-lang/rust/issues/62785/
8290
[62814]: https://github.com/rust-lang/rust/pull/62814/
91+
[62896]: https://github.com/rust-lang/rust/issues/62896/
8392
[63000]: https://github.com/rust-lang/rust/pull/63000/
8493
[63056]: https://github.com/rust-lang/rust/pull/63056/
8594
[63107]: https://github.com/rust-lang/rust/pull/63107/

src/bootstrap/dist.rs

+47-19
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ use build_helper::{output, t};
1818

1919
use crate::{Compiler, Mode, LLVM_TOOLS};
2020
use crate::channel;
21-
use crate::util::{is_dylib, exe};
21+
use crate::util::{is_dylib, exe, timeit};
2222
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
2323
use crate::compile;
2424
use crate::tool::{self, Tool};
@@ -91,14 +91,15 @@ impl Step for Docs {
9191

9292
let name = pkgname(builder, "rust-docs");
9393

94-
builder.info(&format!("Dist docs ({})", host));
9594
if !builder.config.docs {
96-
builder.info("\tskipping - docs disabled");
9795
return distdir(builder).join(format!("{}-{}.tar.gz", name, host));
9896
}
9997

10098
builder.default_doc(None);
10199

100+
builder.info(&format!("Dist docs ({})", host));
101+
let _time = timeit(builder);
102+
102103
let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
103104
let _ = fs::remove_dir_all(&image);
104105

@@ -151,9 +152,7 @@ impl Step for RustcDocs {
151152

152153
let name = pkgname(builder, "rustc-docs");
153154

154-
builder.info(&format!("Dist compiler docs ({})", host));
155155
if !builder.config.compiler_docs {
156-
builder.info("\tskipping - compiler docs disabled");
157156
return distdir(builder).join(format!("{}-{}.tar.gz", name, host));
158157
}
159158

@@ -179,6 +178,9 @@ impl Step for RustcDocs {
179178
.arg("--component-name=rustc-docs")
180179
.arg("--legacy-manifest-dirs=rustlib,cargo")
181180
.arg("--bulk-dirs=share/doc/rust/html");
181+
182+
builder.info(&format!("Dist compiler docs ({})", host));
183+
let _time = timeit(builder);
182184
builder.run(&mut cmd);
183185
builder.remove_dir(&image);
184186

@@ -350,6 +352,7 @@ impl Step for Mingw {
350352
}
351353

352354
builder.info(&format!("Dist mingw ({})", host));
355+
let _time = timeit(builder);
353356
let name = pkgname(builder, "rust-mingw");
354357
let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
355358
let _ = fs::remove_dir_all(&image);
@@ -403,7 +406,6 @@ impl Step for Rustc {
403406
let compiler = self.compiler;
404407
let host = self.compiler.host;
405408

406-
builder.info(&format!("Dist rustc stage{} ({})", compiler.stage, host));
407409
let name = pkgname(builder, "rustc");
408410
let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
409411
let _ = fs::remove_dir_all(&image);
@@ -460,6 +462,9 @@ impl Step for Rustc {
460462
.arg(format!("--package-name={}-{}", name, host))
461463
.arg("--component-name=rustc")
462464
.arg("--legacy-manifest-dirs=rustlib,cargo");
465+
466+
builder.info(&format!("Dist rustc stage{} ({})", compiler.stage, host));
467+
let _time = timeit(builder);
463468
builder.run(&mut cmd);
464469
builder.remove_dir(&image);
465470
builder.remove_dir(&overlay);
@@ -662,8 +667,6 @@ impl Step for Std {
662667
let target = self.target;
663668

664669
let name = pkgname(builder, "rust-std");
665-
builder.info(&format!("Dist std stage{} ({} -> {})",
666-
compiler.stage, &compiler.host, target));
667670

668671
// The only true set of target libraries came from the build triple, so
669672
// let's reduce redundant work by only producing archives from that host.
@@ -714,6 +717,10 @@ impl Step for Std {
714717
.arg(format!("--package-name={}-{}", name, target))
715718
.arg(format!("--component-name=rust-std-{}", target))
716719
.arg("--legacy-manifest-dirs=rustlib,cargo");
720+
721+
builder.info(&format!("Dist std stage{} ({} -> {})",
722+
compiler.stage, &compiler.host, target));
723+
let _time = timeit(builder);
717724
builder.run(&mut cmd);
718725
builder.remove_dir(&image);
719726
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
@@ -754,11 +761,9 @@ impl Step for Analysis {
754761
let compiler = self.compiler;
755762
let target = self.target;
756763
assert!(builder.config.extended);
757-
builder.info("Dist analysis");
758764
let name = pkgname(builder, "rust-analysis");
759765

760766
if &compiler.host != builder.config.build {
761-
builder.info("\tskipping, not a build host");
762767
return distdir(builder).join(format!("{}-{}.tar.gz", name, target));
763768
}
764769

@@ -786,6 +791,9 @@ impl Step for Analysis {
786791
.arg(format!("--package-name={}-{}", name, target))
787792
.arg(format!("--component-name=rust-analysis-{}", target))
788793
.arg("--legacy-manifest-dirs=rustlib,cargo");
794+
795+
builder.info("Dist analysis");
796+
let _time = timeit(builder);
789797
builder.run(&mut cmd);
790798
builder.remove_dir(&image);
791799
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
@@ -874,8 +882,6 @@ impl Step for Src {
874882

875883
/// Creates the `rust-src` installer component
876884
fn run(self, builder: &Builder<'_>) -> PathBuf {
877-
builder.info("Dist src");
878-
879885
let name = pkgname(builder, "rust-src");
880886
let image = tmpdir(builder).join(format!("{}-image", name));
881887
let _ = fs::remove_dir_all(&image);
@@ -930,6 +936,9 @@ impl Step for Src {
930936
.arg(format!("--package-name={}", name))
931937
.arg("--component-name=rust-src")
932938
.arg("--legacy-manifest-dirs=rustlib,cargo");
939+
940+
builder.info("Dist src");
941+
let _time = timeit(builder);
933942
builder.run(&mut cmd);
934943

935944
builder.remove_dir(&image);
@@ -957,8 +966,6 @@ impl Step for PlainSourceTarball {
957966

958967
/// Creates the plain source tarball
959968
fn run(self, builder: &Builder<'_>) -> PathBuf {
960-
builder.info("Create plain source tarball");
961-
962969
// Make sure that the root folder of tarball has the correct name
963970
let plain_name = format!("{}-src", pkgname(builder, "rustc"));
964971
let plain_dst_src = tmpdir(builder).join(&plain_name);
@@ -1020,6 +1027,9 @@ impl Step for PlainSourceTarball {
10201027
.arg("--output").arg(&tarball)
10211028
.arg("--work-dir=.")
10221029
.current_dir(tmpdir(builder));
1030+
1031+
builder.info("Create plain source tarball");
1032+
let _time = timeit(builder);
10231033
builder.run(&mut cmd);
10241034
distdir(builder).join(&format!("{}.tar.gz", plain_name))
10251035
}
@@ -1073,7 +1083,6 @@ impl Step for Cargo {
10731083
let compiler = self.compiler;
10741084
let target = self.target;
10751085

1076-
builder.info(&format!("Dist cargo stage{} ({})", compiler.stage, target));
10771086
let src = builder.src.join("src/tools/cargo");
10781087
let etc = src.join("src/etc");
10791088
let release_num = builder.release_num("cargo");
@@ -1126,6 +1135,9 @@ impl Step for Cargo {
11261135
.arg(format!("--package-name={}-{}", name, target))
11271136
.arg("--component-name=cargo")
11281137
.arg("--legacy-manifest-dirs=rustlib,cargo");
1138+
1139+
builder.info(&format!("Dist cargo stage{} ({})", compiler.stage, target));
1140+
let _time = timeit(builder);
11291141
builder.run(&mut cmd);
11301142
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
11311143
}
@@ -1161,7 +1173,6 @@ impl Step for Rls {
11611173
let target = self.target;
11621174
assert!(builder.config.extended);
11631175

1164-
builder.info(&format!("Dist RLS stage{} ({})", compiler.stage, target));
11651176
let src = builder.src.join("src/tools/rls");
11661177
let release_num = builder.release_num("rls");
11671178
let name = pkgname(builder, "rls");
@@ -1210,6 +1221,8 @@ impl Step for Rls {
12101221
.arg("--legacy-manifest-dirs=rustlib,cargo")
12111222
.arg("--component-name=rls-preview");
12121223

1224+
builder.info(&format!("Dist RLS stage{} ({})", compiler.stage, target));
1225+
let _time = timeit(builder);
12131226
builder.run(&mut cmd);
12141227
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
12151228
}
@@ -1245,7 +1258,6 @@ impl Step for Clippy {
12451258
let target = self.target;
12461259
assert!(builder.config.extended);
12471260

1248-
builder.info(&format!("Dist clippy stage{} ({})", compiler.stage, target));
12491261
let src = builder.src.join("src/tools/clippy");
12501262
let release_num = builder.release_num("clippy");
12511263
let name = pkgname(builder, "clippy");
@@ -1299,6 +1311,8 @@ impl Step for Clippy {
12991311
.arg("--legacy-manifest-dirs=rustlib,cargo")
13001312
.arg("--component-name=clippy-preview");
13011313

1314+
builder.info(&format!("Dist clippy stage{} ({})", compiler.stage, target));
1315+
let _time = timeit(builder);
13021316
builder.run(&mut cmd);
13031317
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
13041318
}
@@ -1334,7 +1348,6 @@ impl Step for Miri {
13341348
let target = self.target;
13351349
assert!(builder.config.extended);
13361350

1337-
builder.info(&format!("Dist miri stage{} ({})", compiler.stage, target));
13381351
let src = builder.src.join("src/tools/miri");
13391352
let release_num = builder.release_num("miri");
13401353
let name = pkgname(builder, "miri");
@@ -1389,6 +1402,8 @@ impl Step for Miri {
13891402
.arg("--legacy-manifest-dirs=rustlib,cargo")
13901403
.arg("--component-name=miri-preview");
13911404

1405+
builder.info(&format!("Dist miri stage{} ({})", compiler.stage, target));
1406+
let _time = timeit(builder);
13921407
builder.run(&mut cmd);
13931408
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
13941409
}
@@ -1423,7 +1438,6 @@ impl Step for Rustfmt {
14231438
let compiler = self.compiler;
14241439
let target = self.target;
14251440

1426-
builder.info(&format!("Dist Rustfmt stage{} ({})", compiler.stage, target));
14271441
let src = builder.src.join("src/tools/rustfmt");
14281442
let release_num = builder.release_num("rustfmt");
14291443
let name = pkgname(builder, "rustfmt");
@@ -1476,6 +1490,8 @@ impl Step for Rustfmt {
14761490
.arg("--legacy-manifest-dirs=rustlib,cargo")
14771491
.arg("--component-name=rustfmt-preview");
14781492

1493+
builder.info(&format!("Dist Rustfmt stage{} ({})", compiler.stage, target));
1494+
let _time = timeit(builder);
14791495
builder.run(&mut cmd);
14801496
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
14811497
}
@@ -1576,6 +1592,7 @@ impl Step for Extended {
15761592
input_tarballs.push(tarball);
15771593
}
15781594

1595+
builder.info("building combined installer");
15791596
let mut cmd = rust_installer(builder);
15801597
cmd.arg("combine")
15811598
.arg("--product-name=Rust")
@@ -1587,7 +1604,9 @@ impl Step for Extended {
15871604
.arg("--legacy-manifest-dirs=rustlib,cargo")
15881605
.arg("--input-tarballs").arg(input_tarballs)
15891606
.arg("--non-installed-overlay").arg(&overlay);
1607+
let time = timeit(&builder);
15901608
builder.run(&mut cmd);
1609+
drop(time);
15911610

15921611
let mut license = String::new();
15931612
license += &builder.read(&builder.src.join("COPYRIGHT"));
@@ -1643,6 +1662,7 @@ impl Step for Extended {
16431662
};
16441663

16451664
if target.contains("apple-darwin") {
1665+
builder.info("building pkg installer");
16461666
let pkg = tmp.join("pkg");
16471667
let _ = fs::remove_dir_all(&pkg);
16481668

@@ -1692,6 +1712,7 @@ impl Step for Extended {
16921712
pkgname(builder, "rust"),
16931713
target)))
16941714
.arg("--package-path").arg(&pkg);
1715+
let _time = timeit(builder);
16951716
builder.run(&mut cmd);
16961717
}
16971718

@@ -1742,14 +1763,18 @@ impl Step for Extended {
17421763
builder.create(&exe.join("LICENSE.txt"), &license);
17431764

17441765
// Generate exe installer
1766+
builder.info("building `exe` installer with `iscc`");
17451767
let mut cmd = Command::new("iscc");
17461768
cmd.arg("rust.iss")
1769+
.arg("/Q")
17471770
.current_dir(&exe);
17481771
if target.contains("windows-gnu") {
17491772
cmd.arg("/dMINGW");
17501773
}
17511774
add_env(builder, &mut cmd, target);
1775+
let time = timeit(builder);
17521776
builder.run(&mut cmd);
1777+
drop(time);
17531778
builder.install(&exe.join(format!("{}-{}.exe", pkgname(builder, "rust"), target)),
17541779
&distdir(builder),
17551780
0o755);
@@ -1914,6 +1939,7 @@ impl Step for Extended {
19141939
builder.install(&etc.join("gfx/banner.bmp"), &exe, 0o644);
19151940
builder.install(&etc.join("gfx/dialogbg.bmp"), &exe, 0o644);
19161941

1942+
builder.info(&format!("building `msi` installer with {:?}", light));
19171943
let filename = format!("{}-{}.msi", pkgname(builder, "rust"), target);
19181944
let mut cmd = Command::new(&light);
19191945
cmd.arg("-nologo")
@@ -1946,6 +1972,7 @@ impl Step for Extended {
19461972
// ICE57 wrongly complains about the shortcuts
19471973
cmd.arg("-sice:ICE57");
19481974

1975+
let _time = timeit(builder);
19491976
builder.run(&mut cmd);
19501977

19511978
if !builder.config.dry_run {
@@ -2114,6 +2141,7 @@ impl Step for LlvmTools {
21142141
}
21152142

21162143
builder.info(&format!("Dist LlvmTools ({})", target));
2144+
let _time = timeit(builder);
21172145
let src = builder.src.join("src/llvm-project/llvm");
21182146
let name = pkgname(builder, "llvm-tools");
21192147

src/etc/installer/exe/rust.iss

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ SourceDir=.\
2525
OutputBaseFilename={#CFG_PACKAGE_NAME}-{#CFG_BUILD}
2626
DefaultDirName={sd}\Rust
2727

28-
Compression=lzma2/ultra
29-
InternalCompressLevel=ultra
30-
SolidCompression=true
28+
Compression=lzma2/normal
29+
InternalCompressLevel=normal
30+
SolidCompression=no
3131

3232
ChangesEnvironment=true
3333
ChangesAssociations=no

src/etc/installer/msi/rust.wxs

+1-1
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152
</Upgrade>
153153

154154
<!-- Specifies a single cab file to be embedded in the installer's .msi. -->
155-
<MediaTemplate EmbedCab="yes" CompressionLevel="high" />
155+
<MediaTemplate EmbedCab="yes" CompressionLevel="mszip" />
156156

157157
<!-- Send a WM_SETTINGCHANGE message to tell processes like explorer to update their
158158
environments so any new command prompts get the updated %PATH% -->

src/librustc/lint/builtin.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
use crate::lint::{LintPass, LateLintPass, LintArray};
88
use crate::middle::stability;
99
use crate::session::Session;
10-
use errors::{Applicability, DiagnosticBuilder};
10+
use errors::{Applicability, DiagnosticBuilder, pluralise};
1111
use syntax::ast;
1212
use syntax::source_map::Span;
1313
use syntax::symbol::Symbol;
@@ -524,7 +524,7 @@ pub(crate) fn add_elided_lifetime_in_path_suggestion(
524524
};
525525
db.span_suggestion(
526526
replace_span,
527-
&format!("indicate the anonymous lifetime{}", if n >= 2 { "s" } else { "" }),
527+
&format!("indicate the anonymous lifetime{}", pluralise!(n)),
528528
suggestion,
529529
Applicability::MachineApplicable
530530
);

src/librustc/middle/resolve_lifetime.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::ty::{self, DefIdTree, GenericParamDefKind, TyCtxt};
1717
use crate::rustc::lint;
1818
use crate::session::Session;
1919
use crate::util::nodemap::{DefIdMap, FxHashMap, FxHashSet, HirIdMap, HirIdSet};
20-
use errors::{Applicability, DiagnosticBuilder};
20+
use errors::{Applicability, DiagnosticBuilder, pluralise};
2121
use rustc_macros::HashStable;
2222
use std::borrow::Cow;
2323
use std::cell::Cell;
@@ -3047,7 +3047,7 @@ pub fn report_missing_lifetime_specifiers(
30473047
span,
30483048
E0106,
30493049
"missing lifetime specifier{}",
3050-
if count > 1 { "s" } else { "" }
3050+
pluralise!(count)
30513051
)
30523052
}
30533053

0 commit comments

Comments
 (0)