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 #74662

Merged
merged 31 commits into from
Jul 23, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
6100b74
Advertise correct stable version for const control flow
ecstatic-morse Jun 29, 2020
4fb260b
Guard against non-monomorphized type_id intrinsic call
nbdd0121 Jul 4, 2020
4c69d4b
Add the aarch64-apple-darwin target
shepmaster Jul 11, 2020
804241e
Update dependencies that have knowledge about aarch64-apple-darwin
shepmaster Jul 11, 2020
b3340b5
Expand test to cover type_name and monomorphic use
nbdd0121 Jul 21, 2020
430bd39
Do not ICE on assoc type with bad placeholder
JohnTitor Jul 22, 2020
747bc8e
Enable perf try builder
Mark-Simulacrum Jul 21, 2020
49b9a64
rustc_target: Add a target spec option for disabling `--eh-frame-hdr`
petrochenkov Jul 22, 2020
4b05202
build: Remove unnecessary `cargo:rerun-if-env-changed` annotations
petrochenkov Jul 22, 2020
0b662c2
build: Remove unnecessary `build = "build.rs"` annotations
petrochenkov Jul 22, 2020
461c576
build: Harden env var tracking in build scripts
petrochenkov Jul 22, 2020
7be36a8
build: Avoid unnecessary build script reruns in libstd
petrochenkov Jul 22, 2020
6513148
Detect when `'static` obligation might come from an `impl`
estebank Jun 27, 2020
4e08bab
Increase accuracy of lifetime bound on trait object impl suggestion
estebank Jun 28, 2020
6bac3db
Add more context to diagnostic
estebank Jun 29, 2020
7bf39fa
Further tweak wording of E0759 and introduce E0767
estebank Jun 29, 2020
f807437
Use `ty::Instance::resolve` to identify `'static` bound source
estebank Jul 1, 2020
3712dfc
Partially account for case where used method is from trait
estebank Jul 1, 2020
53d96b5
Handle fully-qualified paths and add test cases
estebank Jul 1, 2020
ed53de0
rustdoc: Always warn when linking from public to private items
dennis-hamester Jul 11, 2020
c14641a
rustdoc: Add explanation when linting against public to private item …
dennis-hamester Jul 22, 2020
889a4d9
Change error code number
estebank Jul 20, 2020
fe9babb
Rollup merge of #73783 - estebank:impl-dyn-trait-static-lifetime, r=n…
Manishearth Jul 22, 2020
da449a9
Rollup merge of #73868 - ecstatic-morse:fix-stable-version, r=jonas-s…
Manishearth Jul 22, 2020
02e350f
Rollup merge of #74460 - dennis-hamester:rustdoc-warn-pub-to-priv, r=…
Manishearth Jul 22, 2020
4828895
Rollup merge of #74538 - nbdd0121:issue-73976, r=lcnr
Manishearth Jul 22, 2020
8114dc7
Rollup merge of #74541 - shepmaster:aarch64-apple-darwin-target, r=na…
Manishearth Jul 22, 2020
0edf2e6
Rollup merge of #74600 - Mark-Simulacrum:try-perf, r=pietroalbini
Manishearth Jul 22, 2020
9ac2af1
Rollup merge of #74618 - JohnTitor:no-more-bad-placeholder, r=estebank
Manishearth Jul 22, 2020
7b28e7b
Rollup merge of #74631 - petrochenkov:ehdr2, r=jonas-schievink
Manishearth Jul 22, 2020
b32383c
Rollup merge of #74643 - petrochenkov:noenvrerun, r=Mark-Simulacrum
Manishearth Jul 22, 2020
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
7 changes: 4 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ name: CI
branches:
- auto
- try
- try-perf
- master
pull_request:
branches:
Expand Down Expand Up @@ -146,7 +147,7 @@ jobs:
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
CACHE_DOMAIN: ci-caches.rust-lang.org
if: "github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
strategy:
matrix:
include:
Expand Down Expand Up @@ -717,7 +718,7 @@ jobs:
try-success:
needs:
- try
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
steps:
- name: mark the job as a success
run: exit 0
Expand All @@ -727,7 +728,7 @@ jobs:
try-failure:
needs:
- try
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
steps:
- name: mark the job as a failure
run: exit 1
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -412,9 +412,9 @@ version = "0.1.0"

[[package]]
name = "cc"
version = "1.0.57"
version = "1.0.58"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fde55d2a2bfaa4c9668bbc63f531fbdeee3ffe188f4662511ce2c22b3eedebe"
checksum = "f9a06fb2e53271d7c279ec1efea6ab691c35a2ae67ec0d91d7acec0caf13b518"
dependencies = [
"jobserver",
]
Expand Down Expand Up @@ -1576,9 +1576,9 @@ checksum = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f"

[[package]]
name = "libc"
version = "0.2.71"
version = "0.2.73"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49"
checksum = "bd7d4bd64732af4bf3a67f367c27df8520ad7e230c5817b8ff485864d80242b9"
dependencies = [
"rustc-std-workspace-core",
]
Expand Down
16 changes: 12 additions & 4 deletions src/build_helper/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
use std::ffi::{OsStr, OsString};
use std::fmt::Display;
use std::path::{Path, PathBuf};
use std::process::{Command, Stdio};
use std::time::{SystemTime, UNIX_EPOCH};
Expand Down Expand Up @@ -28,6 +30,14 @@ macro_rules! t {
};
}

/// Reads an environment variable and adds it to dependencies.
/// Supposed to be used for all variables except those set for build scripts by cargo
/// https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts
pub fn tracked_env_var_os<K: AsRef<OsStr> + Display>(key: K) -> Option<OsString> {
println!("cargo:rerun-if-env-changed={}", key);
env::var_os(key)
}

// Because Cargo adds the compiler's dylib path to our library search path, llvm-config may
// break: the dylib path for the compiler, as of this writing, contains a copy of the LLVM
// shared library, which means that when our freshly built llvm-config goes to load it's
Expand All @@ -37,10 +47,8 @@ macro_rules! t {
// perfect -- we might actually want to see something from Cargo's added library paths -- but
// for now it works.
pub fn restore_library_path() {
println!("cargo:rerun-if-env-changed=REAL_LIBRARY_PATH_VAR");
println!("cargo:rerun-if-env-changed=REAL_LIBRARY_PATH");
let key = env::var_os("REAL_LIBRARY_PATH_VAR").expect("REAL_LIBRARY_PATH_VAR");
if let Some(env) = env::var_os("REAL_LIBRARY_PATH") {
let key = tracked_env_var_os("REAL_LIBRARY_PATH_VAR").expect("REAL_LIBRARY_PATH_VAR");
if let Some(env) = tracked_env_var_os("REAL_LIBRARY_PATH") {
env::set_var(&key, &env);
} else {
env::remove_var(&key);
Expand Down
7 changes: 4 additions & 3 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ on:
branches:
- auto
- try
- try-perf
- master
pull_request:
branches:
Expand Down Expand Up @@ -285,7 +286,7 @@ jobs:
name: try
env:
<<: [*shared-ci-variables, *prod-variables]
if: github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'
if: github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'
strategy:
matrix:
include:
Expand Down Expand Up @@ -645,11 +646,11 @@ jobs:
# successful listening to webhooks only.
try-success:
needs: [try]
if: "success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
if: "success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
<<: *base-success-job
try-failure:
needs: [try]
if: "!success() && github.event_name == 'push' && github.ref == 'refs/heads/try' && github.repository == 'rust-lang-ci/rust'"
if: "!success() && github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
<<: *base-failure-job
auto-success:
needs: [auto]
Expand Down
1 change: 0 additions & 1 deletion src/libprofiler_builtins/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[package]
authors = ["The Rust Project Developers"]
build = "build.rs"
name = "profiler_builtins"
version = "0.0.0"
edition = "2018"
Expand Down
2 changes: 2 additions & 0 deletions src/libprofiler_builtins/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ fn main() {
let target = env::var("TARGET").expect("TARGET was not set");
let cfg = &mut cc::Build::new();

// FIXME: `rerun-if-changed` directives are not currently emitted and the build script
// will not rerun on changes in these source files or headers included into them.
let mut profile_sources = vec![
"GCDAProfiling.c",
"InstrProfiling.c",
Expand Down
5 changes: 0 additions & 5 deletions src/librustc_ast/build.rs

This file was deleted.

1 change: 0 additions & 1 deletion src/librustc_attr/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ authors = ["The Rust Project Developers"]
name = "rustc_attr"
version = "0.0.0"
edition = "2018"
build = "build.rs"

[lib]
name = "rustc_attr"
Expand Down
5 changes: 0 additions & 5 deletions src/librustc_attr/build.rs

This file was deleted.

6 changes: 0 additions & 6 deletions src/librustc_codegen_llvm/build.rs

This file was deleted.

4 changes: 3 additions & 1 deletion src/librustc_codegen_ssa/back/link.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1598,7 +1598,9 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
}

// NO-OPT-OUT, OBJECT-FILES-NO, AUDIT-ORDER
cmd.add_eh_frame_header();
if sess.target.target.options.eh_frame_header {
cmd.add_eh_frame_header();
}

// NO-OPT-OUT, OBJECT-FILES-NO
if crt_objects_fallback {
Expand Down
8 changes: 1 addition & 7 deletions src/librustc_codegen_ssa/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -619,13 +619,7 @@ impl<'a> Linker for GccLinker<'a> {
// Some versions of `gcc` add it implicitly, some (e.g. `musl-gcc`) don't,
// so we just always add it.
fn add_eh_frame_header(&mut self) {
if !self.sess.target.target.options.is_like_osx
&& !self.sess.target.target.options.is_like_windows
&& !self.sess.target.target.options.is_like_solaris
&& self.sess.target.target.target_os != "uefi"
{
self.linker_arg("--eh-frame-hdr");
}
self.linker_arg("--eh-frame-hdr");
}
}

Expand Down
4 changes: 0 additions & 4 deletions src/librustc_codegen_ssa/build.rs

This file was deleted.

7 changes: 0 additions & 7 deletions src/librustc_driver/build.rs

This file was deleted.

1 change: 1 addition & 0 deletions src/librustc_error_codes/error_codes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -633,4 +633,5 @@ E0771: include_str!("./error_codes/E0771.md"),
E0755, // `#[ffi_pure]` is only allowed on foreign functions
E0756, // `#[ffi_const]` is only allowed on foreign functions
E0757, // `#[ffi_const]` functions cannot be `#[ffi_pure]`
E0772, // `'static' obligation coming from `impl dyn Trait {}` or `impl Foo for dyn Bar {}`.
}
4 changes: 2 additions & 2 deletions src/librustc_feature/accepted.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,9 +262,9 @@ declare_features! (
/// Allows using subslice patterns, `[a, .., b]` and `[a, xs @ .., b]`.
(accepted, slice_patterns, "1.42.0", Some(62254), None),
/// Allows the use of `if` and `match` in constants.
(accepted, const_if_match, "1.45.0", Some(49146), None),
(accepted, const_if_match, "1.46.0", Some(49146), None),
/// Allows the use of `loop` and `while` in constants.
(accepted, const_loop, "1.45.0", Some(52000), None),
(accepted, const_loop, "1.46.0", Some(52000), None),
/// Allows `#[track_caller]` to be used which provides
/// accurate caller location reporting during panic (RFC 2091).
(accepted, track_caller, "1.46.0", Some(47809), None),
Expand Down
12 changes: 11 additions & 1 deletion src/librustc_hir/hir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2198,7 +2198,17 @@ pub enum IsAsync {
NotAsync,
}

#[derive(Copy, Clone, PartialEq, RustcEncodable, RustcDecodable, Debug, HashStable_Generic)]
#[derive(
Copy,
Clone,
PartialEq,
RustcEncodable,
RustcDecodable,
Debug,
HashStable_Generic,
Eq,
Hash
)]
pub enum Defaultness {
Default { has_value: bool },
Final,
Expand Down
4 changes: 0 additions & 4 deletions src/librustc_incremental/build.rs

This file was deleted.

10 changes: 6 additions & 4 deletions src/librustc_infer/infer/combine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,13 @@ use crate::traits::{Obligation, PredicateObligations};

use rustc_ast::ast;
use rustc_hir::def_id::DefId;
use rustc_middle::traits::ObligationCause;
use rustc_middle::ty::error::TypeError;
use rustc_middle::ty::relate::{self, Relate, RelateResult, TypeRelation};
use rustc_middle::ty::subst::SubstsRef;
use rustc_middle::ty::{self, InferConst, ToPredicate, Ty, TyCtxt, TypeFoldable};
use rustc_middle::ty::{IntType, UintType};
use rustc_span::{Span, DUMMY_SP};
use rustc_span::DUMMY_SP;

#[derive(Clone)]
pub struct CombineFields<'infcx, 'tcx> {
Expand Down Expand Up @@ -367,10 +368,11 @@ impl<'infcx, 'tcx> CombineFields<'infcx, 'tcx> {
};

debug!("generalize: for_universe = {:?}", for_universe);
debug!("generalize: trace = {:?}", self.trace);

let mut generalize = Generalizer {
infcx: self.infcx,
span: self.trace.cause.span,
cause: &self.trace.cause,
for_vid_sub_root: self.infcx.inner.borrow_mut().type_variables().sub_root_var(for_vid),
for_universe,
ambient_variance,
Expand Down Expand Up @@ -414,7 +416,7 @@ struct Generalizer<'cx, 'tcx> {
infcx: &'cx InferCtxt<'cx, 'tcx>,

/// The span, used when creating new type variables and things.
span: Span,
cause: &'cx ObligationCause<'tcx>,

/// The vid of the type variable that is in the process of being
/// instantiated; if we find this within the type we are folding,
Expand Down Expand Up @@ -639,7 +641,7 @@ impl TypeRelation<'tcx> for Generalizer<'_, 'tcx> {

// FIXME: This is non-ideal because we don't give a
// very descriptive origin for this region variable.
Ok(self.infcx.next_region_var_in_universe(MiscVariable(self.span), self.for_universe))
Ok(self.infcx.next_region_var_in_universe(MiscVariable(self.cause.span), self.for_universe))
}

fn consts(
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_infer/infer/error_reporting/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2010,7 +2010,7 @@ impl<'a, 'tcx> InferCtxt<'a, 'tcx> {
infer::MiscVariable(_) => String::new(),
infer::PatternRegion(_) => " for pattern".to_string(),
infer::AddrOfRegion(_) => " for borrow expression".to_string(),
infer::Autoref(_) => " for autoref".to_string(),
infer::Autoref(_, _) => " for autoref".to_string(),
infer::Coercion(_) => " for automatic coercion".to_string(),
infer::LateBoundRegion(_, br, infer::FnCall) => {
format!(" for lifetime parameter {}in function call", br_string(br))
Expand Down
Loading