Skip to content

Commit

Permalink
Auto merge of #66997 - Centril:rollup-uraqpgu, r=Centril
Browse files Browse the repository at this point in the history
Rollup of 7 pull requests

Successful merges:

 - #66750 (Update the `wasi` crate for `wasm32-wasi`)
 - #66878 (Move Sessions into (new) librustc_session)
 - #66903 (parse_enum_item -> parse_enum_variant)
 - #66951 (miri: add throw_machine_stop macro)
 - #66957 (Change Linker for x86_64-fortanix-unknown-sgx target to rust-lld)
 - #66960 ([const-prop] Fix ICE calculating enum discriminant)
 - #66973 (Update the minimum external LLVM to 7)

Failed merges:

r? @ghost
  • Loading branch information
bors committed Dec 3, 2019
2 parents f577b0e + 8dcb532 commit 7afe6d9
Show file tree
Hide file tree
Showing 88 changed files with 966 additions and 984 deletions.
31 changes: 29 additions & 2 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
dependencies = [
"cfg-if",
"libc",
"wasi",
"wasi 0.7.0",
]

[[package]]
Expand Down Expand Up @@ -3205,6 +3205,7 @@ dependencies = [
"rustc_fs_util",
"rustc_index",
"rustc_macros",
"rustc_session",
"rustc_target",
"scoped-tls",
"serialize",
Expand Down Expand Up @@ -3518,6 +3519,7 @@ dependencies = [
"rustc_fs_util",
"rustc_incremental",
"rustc_index",
"rustc_session",
"rustc_target",
"serialize",
"syntax",
Expand Down Expand Up @@ -3634,6 +3636,7 @@ dependencies = [
"rustc",
"rustc_data_structures",
"rustc_fs_util",
"rustc_session",
"serialize",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3697,6 +3700,7 @@ dependencies = [
"rustc_error_codes",
"rustc_feature",
"rustc_index",
"rustc_session",
"rustc_target",
"syntax",
"syntax_pos",
Expand Down Expand Up @@ -3884,6 +3888,22 @@ dependencies = [
"syntax_pos",
]

[[package]]
name = "rustc_session"
version = "0.0.0"
dependencies = [
"log",
"num_cpus",
"rustc_data_structures",
"rustc_errors",
"rustc_feature",
"rustc_fs_util",
"rustc_index",
"rustc_target",
"serialize",
"syntax_pos",
]

[[package]]
name = "rustc_target"
version = "0.0.0"
Expand Down Expand Up @@ -4301,7 +4321,7 @@ dependencies = [
"rustc_msan",
"rustc_tsan",
"unwind",
"wasi",
"wasi 0.9.0+wasi-snapshot-preview1",
]

[[package]]
Expand Down Expand Up @@ -4463,6 +4483,7 @@ dependencies = [
"rustc_index",
"rustc_lexer",
"rustc_macros",
"rustc_session",
"scoped-tls",
"serialize",
"smallvec 1.0.0",
Expand Down Expand Up @@ -5172,6 +5193,12 @@ name = "wasi"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"

[[package]]
name = "wasi"
version = "0.9.0+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
dependencies = [
"compiler_builtins",
"rustc-std-workspace-alloc",
Expand Down
4 changes: 2 additions & 2 deletions src/bootstrap/native.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
let mut parts = version.split('.').take(2)
.filter_map(|s| s.parse::<u32>().ok());
if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) {
if major >= 6 {
if major >= 7 {
return
}
}
panic!("\n\nbad LLVM version: {}, need >=6.0\n\n", version)
panic!("\n\nbad LLVM version: {}, need >=7.0\n\n", version)
}

fn configure_cmake(builder: &Builder<'_>,
Expand Down
2 changes: 1 addition & 1 deletion src/ci/azure-pipelines/auto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0:
x86_64-gnu-llvm-7:
RUST_BACKTRACE: 1
dist-x86_64-linux: {}
dist-x86_64-linux-alt:
Expand Down
2 changes: 1 addition & 1 deletion src/ci/azure-pipelines/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- template: steps/run.yml
strategy:
matrix:
x86_64-gnu-llvm-6.0: {}
x86_64-gnu-llvm-7: {}
mingw-check: {}
x86_64-gnu-tools:
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:16.04
FROM ubuntu:18.04

RUN apt-get update && apt-get install -y --no-install-recommends \
g++ \
Expand All @@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
cmake \
sudo \
gdb \
llvm-6.0-tools \
llvm-7-tools \
libedit-dev \
libssl-dev \
pkg-config \
Expand All @@ -24,7 +24,7 @@ RUN sh /scripts/sccache.sh
# using llvm-link-shared due to libffi issues -- see #34486
ENV RUST_CONFIGURE_ARGS \
--build=x86_64-unknown-linux-gnu \
--llvm-root=/usr/lib/llvm-6.0 \
--llvm-root=/usr/lib/llvm-7 \
--enable-llvm-link-shared
ENV SCRIPT python2.7 ../x.py test src/tools/tidy && python2.7 ../x.py test

Expand Down
1 change: 1 addition & 0 deletions src/librustc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,4 @@ rustc_fs_util = { path = "../librustc_fs_util" }
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
measureme = "0.4"
rustc_error_codes = { path = "../librustc_error_codes" }
rustc_session = { path = "../librustc_session" }
1 change: 0 additions & 1 deletion src/librustc/dep_graph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ mod prev;
mod query;
mod safe;
mod serialized;
pub mod cgu_reuse_tracker;

pub use self::dep_node::{DepNode, DepKind, DepConstructor, WorkProductId, RecoverKey, label_strs};
pub use self::graph::{DepGraph, WorkProduct, DepNodeIndex, DepNodeColor, TaskDeps, hash_result};
Expand Down
7 changes: 1 addition & 6 deletions src/librustc/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@
#![recursion_limit="512"]

#[macro_use] extern crate bitflags;
extern crate getopts;
#[macro_use] extern crate scoped_tls;
#[cfg(windows)]
extern crate libc;
Expand All @@ -74,10 +73,6 @@ extern crate libc;
#[macro_use] extern crate syntax;
#[macro_use] extern crate smallvec;

// Use the test crate here so we depend on getopts through it. This allow tools to link to both
// librustc_driver and libtest.
extern crate test as _;

#[cfg(test)]
mod tests;

Expand Down Expand Up @@ -113,7 +108,7 @@ pub mod middle {
}

pub mod mir;
pub mod session;
pub use rustc_session as session;
pub mod traits;
pub mod ty;

Expand Down
31 changes: 4 additions & 27 deletions src/librustc/lint/builtin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ use syntax::ast;
use syntax::edition::Edition;
use syntax::source_map::Span;
use syntax::symbol::Symbol;
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
use rustc_session::declare_lint;

declare_lint! {
pub EXCEEDING_BITSHIFTS,
Expand Down Expand Up @@ -404,31 +406,6 @@ declare_lint! {
};
}

/// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`.
pub mod parser {
declare_lint! {
pub ILL_FORMED_ATTRIBUTE_INPUT,
Deny,
"ill-formed attribute inputs that were previously accepted and used in practice",
@future_incompatible = super::FutureIncompatibleInfo {
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
edition: None,
};
}

declare_lint! {
pub META_VARIABLE_MISUSE,
Allow,
"possible meta-variable misuse at macro definition"
}

declare_lint! {
pub INCOMPLETE_INCLUDE,
Deny,
"trailing content in included file"
}
}

declare_lint! {
pub DEPRECATED_IN_FUTURE,
Allow,
Expand Down Expand Up @@ -520,8 +497,8 @@ declare_lint_pass! {
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
MACRO_USE_EXTERN_CRATE,
MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
parser::ILL_FORMED_ATTRIBUTE_INPUT,
parser::META_VARIABLE_MISUSE,
ILL_FORMED_ATTRIBUTE_INPUT,
META_VARIABLE_MISUSE,
DEPRECATED_IN_FUTURE,
AMBIGUOUS_ASSOCIATED_ITEMS,
MUTABLE_BORROW_RESERVATION_CONFLICT,
Expand Down
1 change: 1 addition & 0 deletions src/librustc/lint/internal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ use errors::Applicability;
use rustc_data_structures::fx::FxHashMap;
use syntax::ast::{Ident, Item, ItemKind};
use syntax::symbol::{sym, Symbol};
use rustc_session::declare_tool_lint;

declare_tool_lint! {
pub rustc::DEFAULT_HASH_TYPES,
Expand Down
20 changes: 2 additions & 18 deletions src/librustc/lint/levels.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use crate::lint::{self, Lint, LintId, Level, LintSource};
use crate::session::Session;
use crate::util::nodemap::FxHashMap;
use errors::{Applicability, DiagnosticBuilder};
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey, StableHasher};
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
use syntax::ast;
use syntax::attr;
use syntax::feature_gate;
Expand Down Expand Up @@ -93,7 +93,7 @@ impl LintLevelSets {

// If `level` is none then we actually assume the default level for this
// lint.
let mut level = level.unwrap_or_else(|| lint.default_level(sess));
let mut level = level.unwrap_or_else(|| lint.default_level(sess.edition()));

// If we're about to issue a warning, check at the last minute for any
// directives against the warnings "lint". If, for example, there's an
Expand Down Expand Up @@ -566,19 +566,3 @@ impl<'a> HashStable<StableHashingContext<'a>> for LintLevelMap {
})
}
}

impl<HCX> HashStable<HCX> for LintId {
#[inline]
fn hash_stable(&self, hcx: &mut HCX, hasher: &mut StableHasher) {
self.lint_name_raw().hash_stable(hcx, hasher);
}
}

impl<HCX> ToStableHashKey<HCX> for LintId {
type KeyType = &'static str;

#[inline]
fn to_stable_hash_key(&self, _: &HCX) -> &'static str {
self.lint_name_raw()
}
}
Loading

0 comments on commit 7afe6d9

Please sign in to comment.