Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 9 pull requests #64666

Merged
merged 20 commits into from
Sep 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
479ce39
Add explanation to type mismatch involving type params and assoc types
estebank Aug 26, 2019
8112f71
rustbuild: Turn down compression on exe installers
alexcrichton Sep 19, 2019
fde8cfe
rustbuild: Turn down compression on msi installers
alexcrichton Sep 19, 2019
255dd3f
rustbuild: Improve output of `dist` step
alexcrichton Sep 19, 2019
633ad73
Update to LLVM 9.0.0
cuviper Sep 20, 2019
9cf9030
Allow using fn pointers in const fn behind const_fn_ptr gate
gnzlbg Sep 20, 2019
d434496
remove feature
gnzlbg Sep 21, 2019
9d4053f
revert error message changes
gnzlbg Sep 21, 2019
e001c5f
unify errors for tuple/struct variants
Sep 21, 2019
a2a57bc
Fixes #63962. Hint about missing tuple parentheses in patterns
sam09 Sep 19, 2019
53a6a2f
fully remove AstBuilder
matklad Sep 21, 2019
13fee42
Rollup merge of #63907 - estebank:assoc-type-mismatch, r=oli-obk
Centril Sep 21, 2019
4580714
Rollup merge of #64615 - alexcrichton:smaller-exe, r=Mark-Simulacrum
Centril Sep 21, 2019
395ec06
Rollup merge of #64617 - alexcrichton:smaller-msi, r=Mark-Simulacrum
Centril Sep 21, 2019
ef86303
Rollup merge of #64618 - alexcrichton:improve-dist-output, r=Mark-Sim…
Centril Sep 21, 2019
b21ec22
Rollup merge of #64619 - sam09:fix-63962, r=Centril
Centril Sep 21, 2019
05d7ae2
Rollup merge of #64634 - cuviper:llvm-9.0.0, r=alexcrichton
Centril Sep 21, 2019
25bdd76
Rollup merge of #64635 - gnzlbg:const_fn_ptr, r=oli-obk
Centril Sep 21, 2019
7eac555
Rollup merge of #64660 - guanqun:unify-errors-for-tuple-struct, r=est…
Centril Sep 21, 2019
f0e69ff
Rollup merge of #64664 - matklad:remove-ast-builder, r=Mark-Simulacrum
Centril Sep 21, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
[submodule "src/llvm-project"]
path = src/llvm-project
url = https://github.com/rust-lang/llvm-project.git
branch = rustc/9.0-2019-07-12
branch = rustc/9.0-2019-09-19
[submodule "src/doc/embedded-book"]
path = src/doc/embedded-book
url = https://github.com/rust-embedded/book.git
66 changes: 47 additions & 19 deletions src/bootstrap/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ use build_helper::{output, t};

use crate::{Compiler, Mode, LLVM_TOOLS};
use crate::channel;
use crate::util::{is_dylib, exe};
use crate::util::{is_dylib, exe, timeit};
use crate::builder::{Builder, RunConfig, ShouldRun, Step};
use crate::compile;
use crate::tool::{self, Tool};
Expand Down Expand Up @@ -91,14 +91,15 @@ impl Step for Docs {

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

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

builder.default_doc(None);

builder.info(&format!("Dist docs ({})", host));
let _time = timeit(builder);

let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
let _ = fs::remove_dir_all(&image);

Expand Down Expand Up @@ -151,9 +152,7 @@ impl Step for RustcDocs {

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

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

Expand All @@ -179,6 +178,9 @@ impl Step for RustcDocs {
.arg("--component-name=rustc-docs")
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg("--bulk-dirs=share/doc/rust/html");

builder.info(&format!("Dist compiler docs ({})", host));
let _time = timeit(builder);
builder.run(&mut cmd);
builder.remove_dir(&image);

Expand Down Expand Up @@ -350,6 +352,7 @@ impl Step for Mingw {
}

builder.info(&format!("Dist mingw ({})", host));
let _time = timeit(builder);
let name = pkgname(builder, "rust-mingw");
let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
let _ = fs::remove_dir_all(&image);
Expand Down Expand Up @@ -403,7 +406,6 @@ impl Step for Rustc {
let compiler = self.compiler;
let host = self.compiler.host;

builder.info(&format!("Dist rustc stage{} ({})", compiler.stage, host));
let name = pkgname(builder, "rustc");
let image = tmpdir(builder).join(format!("{}-{}-image", name, host));
let _ = fs::remove_dir_all(&image);
Expand Down Expand Up @@ -460,6 +462,9 @@ impl Step for Rustc {
.arg(format!("--package-name={}-{}", name, host))
.arg("--component-name=rustc")
.arg("--legacy-manifest-dirs=rustlib,cargo");

builder.info(&format!("Dist rustc stage{} ({})", compiler.stage, host));
let _time = timeit(builder);
builder.run(&mut cmd);
builder.remove_dir(&image);
builder.remove_dir(&overlay);
Expand Down Expand Up @@ -662,8 +667,6 @@ impl Step for Std {
let target = self.target;

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

// The only true set of target libraries came from the build triple, so
// let's reduce redundant work by only producing archives from that host.
Expand Down Expand Up @@ -714,6 +717,10 @@ impl Step for Std {
.arg(format!("--package-name={}-{}", name, target))
.arg(format!("--component-name=rust-std-{}", target))
.arg("--legacy-manifest-dirs=rustlib,cargo");

builder.info(&format!("Dist std stage{} ({} -> {})",
compiler.stage, &compiler.host, target));
let _time = timeit(builder);
builder.run(&mut cmd);
builder.remove_dir(&image);
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
Expand Down Expand Up @@ -754,11 +761,9 @@ impl Step for Analysis {
let compiler = self.compiler;
let target = self.target;
assert!(builder.config.extended);
builder.info("Dist analysis");
let name = pkgname(builder, "rust-analysis");

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

Expand Down Expand Up @@ -786,6 +791,9 @@ impl Step for Analysis {
.arg(format!("--package-name={}-{}", name, target))
.arg(format!("--component-name=rust-analysis-{}", target))
.arg("--legacy-manifest-dirs=rustlib,cargo");

builder.info("Dist analysis");
let _time = timeit(builder);
builder.run(&mut cmd);
builder.remove_dir(&image);
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
Expand Down Expand Up @@ -874,8 +882,6 @@ impl Step for Src {

/// Creates the `rust-src` installer component
fn run(self, builder: &Builder<'_>) -> PathBuf {
builder.info("Dist src");

let name = pkgname(builder, "rust-src");
let image = tmpdir(builder).join(format!("{}-image", name));
let _ = fs::remove_dir_all(&image);
Expand Down Expand Up @@ -930,6 +936,9 @@ impl Step for Src {
.arg(format!("--package-name={}", name))
.arg("--component-name=rust-src")
.arg("--legacy-manifest-dirs=rustlib,cargo");

builder.info("Dist src");
let _time = timeit(builder);
builder.run(&mut cmd);

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

/// Creates the plain source tarball
fn run(self, builder: &Builder<'_>) -> PathBuf {
builder.info("Create plain source tarball");

// Make sure that the root folder of tarball has the correct name
let plain_name = format!("{}-src", pkgname(builder, "rustc"));
let plain_dst_src = tmpdir(builder).join(&plain_name);
Expand Down Expand Up @@ -1020,6 +1027,9 @@ impl Step for PlainSourceTarball {
.arg("--output").arg(&tarball)
.arg("--work-dir=.")
.current_dir(tmpdir(builder));

builder.info("Create plain source tarball");
let _time = timeit(builder);
builder.run(&mut cmd);
distdir(builder).join(&format!("{}.tar.gz", plain_name))
}
Expand Down Expand Up @@ -1073,7 +1083,6 @@ impl Step for Cargo {
let compiler = self.compiler;
let target = self.target;

builder.info(&format!("Dist cargo stage{} ({})", compiler.stage, target));
let src = builder.src.join("src/tools/cargo");
let etc = src.join("src/etc");
let release_num = builder.release_num("cargo");
Expand Down Expand Up @@ -1126,6 +1135,9 @@ impl Step for Cargo {
.arg(format!("--package-name={}-{}", name, target))
.arg("--component-name=cargo")
.arg("--legacy-manifest-dirs=rustlib,cargo");

builder.info(&format!("Dist cargo stage{} ({})", compiler.stage, target));
let _time = timeit(builder);
builder.run(&mut cmd);
distdir(builder).join(format!("{}-{}.tar.gz", name, target))
}
Expand Down Expand Up @@ -1161,7 +1173,6 @@ impl Step for Rls {
let target = self.target;
assert!(builder.config.extended);

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

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

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

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

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

builder.info(&format!("Dist miri stage{} ({})", compiler.stage, target));
let _time = timeit(builder);
builder.run(&mut cmd);
Some(distdir(builder).join(format!("{}-{}.tar.gz", name, target)))
}
Expand Down Expand Up @@ -1423,7 +1438,6 @@ impl Step for Rustfmt {
let compiler = self.compiler;
let target = self.target;

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

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

builder.info("building combined installer");
let mut cmd = rust_installer(builder);
cmd.arg("combine")
.arg("--product-name=Rust")
Expand All @@ -1587,7 +1604,9 @@ impl Step for Extended {
.arg("--legacy-manifest-dirs=rustlib,cargo")
.arg("--input-tarballs").arg(input_tarballs)
.arg("--non-installed-overlay").arg(&overlay);
let time = timeit(&builder);
builder.run(&mut cmd);
drop(time);

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

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

Expand Down Expand Up @@ -1692,6 +1712,7 @@ impl Step for Extended {
pkgname(builder, "rust"),
target)))
.arg("--package-path").arg(&pkg);
let _time = timeit(builder);
builder.run(&mut cmd);
}

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

// Generate exe installer
builder.info("building `exe` installer with `iscc`");
let mut cmd = Command::new("iscc");
cmd.arg("rust.iss")
.arg("/Q")
.current_dir(&exe);
if target.contains("windows-gnu") {
cmd.arg("/dMINGW");
}
add_env(builder, &mut cmd, target);
let time = timeit(builder);
builder.run(&mut cmd);
drop(time);
builder.install(&exe.join(format!("{}-{}.exe", pkgname(builder, "rust"), target)),
&distdir(builder),
0o755);
Expand Down Expand Up @@ -1914,6 +1939,7 @@ impl Step for Extended {
builder.install(&etc.join("gfx/banner.bmp"), &exe, 0o644);
builder.install(&etc.join("gfx/dialogbg.bmp"), &exe, 0o644);

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

let _time = timeit(builder);
builder.run(&mut cmd);

if !builder.config.dry_run {
Expand Down Expand Up @@ -2114,6 +2141,7 @@ impl Step for LlvmTools {
}

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

Expand Down
6 changes: 3 additions & 3 deletions src/etc/installer/exe/rust.iss
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ SourceDir=.\
OutputBaseFilename={#CFG_PACKAGE_NAME}-{#CFG_BUILD}
DefaultDirName={sd}\Rust

Compression=lzma2/ultra
InternalCompressLevel=ultra
SolidCompression=true
Compression=lzma2/normal
InternalCompressLevel=normal
SolidCompression=no

ChangesEnvironment=true
ChangesAssociations=no
Expand Down
2 changes: 1 addition & 1 deletion src/etc/installer/msi/rust.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
</Upgrade>

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

<!-- Send a WM_SETTINGCHANGE message to tell processes like explorer to update their
environments so any new command prompts get the updated %PATH% -->
Expand Down
10 changes: 5 additions & 5 deletions src/librustc/traits/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,11 +659,11 @@ pub struct VtableTraitAliasData<'tcx, N> {
}

/// Creates predicate obligations from the generic bounds.
pub fn predicates_for_generics<'tcx>(cause: ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
generic_bounds: &ty::InstantiatedPredicates<'tcx>)
-> PredicateObligations<'tcx>
{
pub fn predicates_for_generics<'tcx>(
cause: ObligationCause<'tcx>,
param_env: ty::ParamEnv<'tcx>,
generic_bounds: &ty::InstantiatedPredicates<'tcx>,
) -> PredicateObligations<'tcx> {
util::predicates_for_generics(cause, 0, param_env, generic_bounds)
}

Expand Down
27 changes: 13 additions & 14 deletions src/librustc/traits/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -513,20 +513,19 @@ pub fn impl_trait_ref_and_oblig<'a, 'tcx>(
}

/// See [`super::obligations_for_generics`].
pub fn predicates_for_generics<'tcx>(cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ty::ParamEnv<'tcx>,
generic_bounds: &ty::InstantiatedPredicates<'tcx>)
-> Vec<PredicateObligation<'tcx>>
{
debug!("predicates_for_generics(generic_bounds={:?})",
generic_bounds);

generic_bounds.predicates.iter().map(|predicate| {
Obligation { cause: cause.clone(),
recursion_depth,
param_env,
predicate: predicate.clone() }
pub fn predicates_for_generics<'tcx>(
cause: ObligationCause<'tcx>,
recursion_depth: usize,
param_env: ty::ParamEnv<'tcx>,
generic_bounds: &ty::InstantiatedPredicates<'tcx>,
) -> Vec<PredicateObligation<'tcx>> {
debug!("predicates_for_generics(generic_bounds={:?})", generic_bounds);

generic_bounds.predicates.iter().map(|predicate| Obligation {
cause: cause.clone(),
recursion_depth,
param_env,
predicate: predicate.clone(),
}).collect()
}

Expand Down
Loading