Skip to content

Commit 7afe6d9

Browse files
committed
Auto merge of #66997 - Centril:rollup-uraqpgu, r=Centril
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
2 parents f577b0e + 8dcb532 commit 7afe6d9

File tree

88 files changed

+966
-984
lines changed

Some content is hidden

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

88 files changed

+966
-984
lines changed

Cargo.lock

+29-2
Original file line numberDiff line numberDiff line change
@@ -1294,7 +1294,7 @@ checksum = "473a1265acc8ff1e808cd0a1af8cee3c2ee5200916058a2ca113c29f2d903571"
12941294
dependencies = [
12951295
"cfg-if",
12961296
"libc",
1297-
"wasi",
1297+
"wasi 0.7.0",
12981298
]
12991299

13001300
[[package]]
@@ -3205,6 +3205,7 @@ dependencies = [
32053205
"rustc_fs_util",
32063206
"rustc_index",
32073207
"rustc_macros",
3208+
"rustc_session",
32083209
"rustc_target",
32093210
"scoped-tls",
32103211
"serialize",
@@ -3518,6 +3519,7 @@ dependencies = [
35183519
"rustc_fs_util",
35193520
"rustc_incremental",
35203521
"rustc_index",
3522+
"rustc_session",
35213523
"rustc_target",
35223524
"serialize",
35233525
"syntax",
@@ -3634,6 +3636,7 @@ dependencies = [
36343636
"rustc",
36353637
"rustc_data_structures",
36363638
"rustc_fs_util",
3639+
"rustc_session",
36373640
"serialize",
36383641
"syntax",
36393642
"syntax_pos",
@@ -3697,6 +3700,7 @@ dependencies = [
36973700
"rustc_error_codes",
36983701
"rustc_feature",
36993702
"rustc_index",
3703+
"rustc_session",
37003704
"rustc_target",
37013705
"syntax",
37023706
"syntax_pos",
@@ -3884,6 +3888,22 @@ dependencies = [
38843888
"syntax_pos",
38853889
]
38863890

3891+
[[package]]
3892+
name = "rustc_session"
3893+
version = "0.0.0"
3894+
dependencies = [
3895+
"log",
3896+
"num_cpus",
3897+
"rustc_data_structures",
3898+
"rustc_errors",
3899+
"rustc_feature",
3900+
"rustc_fs_util",
3901+
"rustc_index",
3902+
"rustc_target",
3903+
"serialize",
3904+
"syntax_pos",
3905+
]
3906+
38873907
[[package]]
38883908
name = "rustc_target"
38893909
version = "0.0.0"
@@ -4301,7 +4321,7 @@ dependencies = [
43014321
"rustc_msan",
43024322
"rustc_tsan",
43034323
"unwind",
4304-
"wasi",
4324+
"wasi 0.9.0+wasi-snapshot-preview1",
43054325
]
43064326

43074327
[[package]]
@@ -4463,6 +4483,7 @@ dependencies = [
44634483
"rustc_index",
44644484
"rustc_lexer",
44654485
"rustc_macros",
4486+
"rustc_session",
44664487
"scoped-tls",
44674488
"serialize",
44684489
"smallvec 1.0.0",
@@ -5172,6 +5193,12 @@ name = "wasi"
51725193
version = "0.7.0"
51735194
source = "registry+https://github.com/rust-lang/crates.io-index"
51745195
checksum = "b89c3ce4ce14bdc6fb6beaf9ec7928ca331de5df7e5ea278375642a2f478570d"
5196+
5197+
[[package]]
5198+
name = "wasi"
5199+
version = "0.9.0+wasi-snapshot-preview1"
5200+
source = "registry+https://github.com/rust-lang/crates.io-index"
5201+
checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
51755202
dependencies = [
51765203
"compiler_builtins",
51775204
"rustc-std-workspace-alloc",

src/bootstrap/native.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -294,11 +294,11 @@ fn check_llvm_version(builder: &Builder<'_>, llvm_config: &Path) {
294294
let mut parts = version.split('.').take(2)
295295
.filter_map(|s| s.parse::<u32>().ok());
296296
if let (Some(major), Some(_minor)) = (parts.next(), parts.next()) {
297-
if major >= 6 {
297+
if major >= 7 {
298298
return
299299
}
300300
}
301-
panic!("\n\nbad LLVM version: {}, need >=6.0\n\n", version)
301+
panic!("\n\nbad LLVM version: {}, need >=7.0\n\n", version)
302302
}
303303

304304
fn configure_cmake(builder: &Builder<'_>,

src/ci/azure-pipelines/auto.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- template: steps/run.yml
1919
strategy:
2020
matrix:
21-
x86_64-gnu-llvm-6.0:
21+
x86_64-gnu-llvm-7:
2222
RUST_BACKTRACE: 1
2323
dist-x86_64-linux: {}
2424
dist-x86_64-linux-alt:

src/ci/azure-pipelines/pr.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
- template: steps/run.yml
1919
strategy:
2020
matrix:
21-
x86_64-gnu-llvm-6.0: {}
21+
x86_64-gnu-llvm-7: {}
2222
mingw-check: {}
2323
x86_64-gnu-tools:
2424
CI_ONLY_WHEN_SUBMODULES_CHANGED: 1

src/ci/docker/x86_64-gnu-llvm-6.0/Dockerfile src/ci/docker/x86_64-gnu-llvm-7/Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:16.04
1+
FROM ubuntu:18.04
22

33
RUN apt-get update && apt-get install -y --no-install-recommends \
44
g++ \
@@ -11,7 +11,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
1111
cmake \
1212
sudo \
1313
gdb \
14-
llvm-6.0-tools \
14+
llvm-7-tools \
1515
libedit-dev \
1616
libssl-dev \
1717
pkg-config \
@@ -24,7 +24,7 @@ RUN sh /scripts/sccache.sh
2424
# using llvm-link-shared due to libffi issues -- see #34486
2525
ENV RUST_CONFIGURE_ARGS \
2626
--build=x86_64-unknown-linux-gnu \
27-
--llvm-root=/usr/lib/llvm-6.0 \
27+
--llvm-root=/usr/lib/llvm-7 \
2828
--enable-llvm-link-shared
2929
ENV SCRIPT python2.7 ../x.py test src/tools/tidy && python2.7 ../x.py test
3030

src/librustc/Cargo.toml

+1
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,4 @@ rustc_fs_util = { path = "../librustc_fs_util" }
3939
smallvec = { version = "1.0", features = ["union", "may_dangle"] }
4040
measureme = "0.4"
4141
rustc_error_codes = { path = "../librustc_error_codes" }
42+
rustc_session = { path = "../librustc_session" }

src/librustc/dep_graph/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ mod prev;
55
mod query;
66
mod safe;
77
mod serialized;
8-
pub mod cgu_reuse_tracker;
98

109
pub use self::dep_node::{DepNode, DepKind, DepConstructor, WorkProductId, RecoverKey, label_strs};
1110
pub use self::graph::{DepGraph, WorkProduct, DepNodeIndex, DepNodeColor, TaskDeps, hash_result};

src/librustc/lib.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@
6464
#![recursion_limit="512"]
6565

6666
#[macro_use] extern crate bitflags;
67-
extern crate getopts;
6867
#[macro_use] extern crate scoped_tls;
6968
#[cfg(windows)]
7069
extern crate libc;
@@ -74,10 +73,6 @@ extern crate libc;
7473
#[macro_use] extern crate syntax;
7574
#[macro_use] extern crate smallvec;
7675

77-
// Use the test crate here so we depend on getopts through it. This allow tools to link to both
78-
// librustc_driver and libtest.
79-
extern crate test as _;
80-
8176
#[cfg(test)]
8277
mod tests;
8378

@@ -113,7 +108,7 @@ pub mod middle {
113108
}
114109

115110
pub mod mir;
116-
pub mod session;
111+
pub use rustc_session as session;
117112
pub mod traits;
118113
pub mod ty;
119114

src/librustc/lint/builtin.rs

+4-27
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ use syntax::ast;
1212
use syntax::edition::Edition;
1313
use syntax::source_map::Span;
1414
use syntax::symbol::Symbol;
15+
use syntax::early_buffered_lints::{ILL_FORMED_ATTRIBUTE_INPUT, META_VARIABLE_MISUSE};
16+
use rustc_session::declare_lint;
1517

1618
declare_lint! {
1719
pub EXCEEDING_BITSHIFTS,
@@ -404,31 +406,6 @@ declare_lint! {
404406
};
405407
}
406408

407-
/// Some lints that are buffered from `libsyntax`. See `syntax::early_buffered_lints`.
408-
pub mod parser {
409-
declare_lint! {
410-
pub ILL_FORMED_ATTRIBUTE_INPUT,
411-
Deny,
412-
"ill-formed attribute inputs that were previously accepted and used in practice",
413-
@future_incompatible = super::FutureIncompatibleInfo {
414-
reference: "issue #57571 <https://github.com/rust-lang/rust/issues/57571>",
415-
edition: None,
416-
};
417-
}
418-
419-
declare_lint! {
420-
pub META_VARIABLE_MISUSE,
421-
Allow,
422-
"possible meta-variable misuse at macro definition"
423-
}
424-
425-
declare_lint! {
426-
pub INCOMPLETE_INCLUDE,
427-
Deny,
428-
"trailing content in included file"
429-
}
430-
}
431-
432409
declare_lint! {
433410
pub DEPRECATED_IN_FUTURE,
434411
Allow,
@@ -520,8 +497,8 @@ declare_lint_pass! {
520497
PROC_MACRO_DERIVE_RESOLUTION_FALLBACK,
521498
MACRO_USE_EXTERN_CRATE,
522499
MACRO_EXPANDED_MACRO_EXPORTS_ACCESSED_BY_ABSOLUTE_PATHS,
523-
parser::ILL_FORMED_ATTRIBUTE_INPUT,
524-
parser::META_VARIABLE_MISUSE,
500+
ILL_FORMED_ATTRIBUTE_INPUT,
501+
META_VARIABLE_MISUSE,
525502
DEPRECATED_IN_FUTURE,
526503
AMBIGUOUS_ASSOCIATED_ITEMS,
527504
MUTABLE_BORROW_RESERVATION_CONFLICT,

src/librustc/lint/internal.rs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ use errors::Applicability;
99
use rustc_data_structures::fx::FxHashMap;
1010
use syntax::ast::{Ident, Item, ItemKind};
1111
use syntax::symbol::{sym, Symbol};
12+
use rustc_session::declare_tool_lint;
1213

1314
declare_tool_lint! {
1415
pub rustc::DEFAULT_HASH_TYPES,

src/librustc/lint/levels.rs

+2-18
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ use crate::lint::{self, Lint, LintId, Level, LintSource};
88
use crate::session::Session;
99
use crate::util::nodemap::FxHashMap;
1010
use errors::{Applicability, DiagnosticBuilder};
11-
use rustc_data_structures::stable_hasher::{HashStable, ToStableHashKey, StableHasher};
11+
use rustc_data_structures::stable_hasher::{HashStable, StableHasher};
1212
use syntax::ast;
1313
use syntax::attr;
1414
use syntax::feature_gate;
@@ -93,7 +93,7 @@ impl LintLevelSets {
9393

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

9898
// If we're about to issue a warning, check at the last minute for any
9999
// directives against the warnings "lint". If, for example, there's an
@@ -566,19 +566,3 @@ impl<'a> HashStable<StableHashingContext<'a>> for LintLevelMap {
566566
})
567567
}
568568
}
569-
570-
impl<HCX> HashStable<HCX> for LintId {
571-
#[inline]
572-
fn hash_stable(&self, hcx: &mut HCX, hasher: &mut StableHasher) {
573-
self.lint_name_raw().hash_stable(hcx, hasher);
574-
}
575-
}
576-
577-
impl<HCX> ToStableHashKey<HCX> for LintId {
578-
type KeyType = &'static str;
579-
580-
#[inline]
581-
fn to_stable_hash_key(&self, _: &HCX) -> &'static str {
582-
self.lint_name_raw()
583-
}
584-
}

0 commit comments

Comments
 (0)