Auto merge of #112494 - matthiaskrgr:rollup-xdf3om8, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #112297 (bootstrap: Disallow `--exclude test::std`) - #112298 (Update field-offset and enable unstable_offset_of) - #112335 (ci: Upgrade loongarch64-linux-gnu GCC to 13.1.0) - #112413 (Adjust span labels for `HIDDEN_GLOB_REEXPORTS`) - #112483 (Add deprecation warning to python versions <3.6 in x.py) r? `@ghost` `@rustbot` modify labels: rollup
This commit is contained in:
commit
ef8ee73fc4
13 changed files with 106 additions and 88 deletions
19
Cargo.lock
19
Cargo.lock
|
@ -848,7 +848,7 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
"memoffset",
|
"memoffset 0.8.0",
|
||||||
"scopeguard",
|
"scopeguard",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -1193,11 +1193,11 @@ dependencies = [
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "field-offset"
|
name = "field-offset"
|
||||||
version = "0.3.5"
|
version = "0.3.6"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a3cf3a800ff6e860c863ca6d4b16fd999db8b752819c1606884047b73e468535"
|
checksum = "38e2275cc4e4fc009b0669731a1e5ab7ebf11f469eaede2bab9309a5b4d6057f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"memoffset",
|
"memoffset 0.9.0",
|
||||||
"rustc_version",
|
"rustc_version",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -2145,6 +2145,15 @@ dependencies = [
|
||||||
"autocfg",
|
"autocfg",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "memoffset"
|
||||||
|
version = "0.9.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c"
|
||||||
|
dependencies = [
|
||||||
|
"autocfg",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mime"
|
name = "mime"
|
||||||
version = "0.3.16"
|
version = "0.3.16"
|
||||||
|
@ -3976,7 +3985,7 @@ version = "0.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"field-offset",
|
"field-offset",
|
||||||
"measureme",
|
"measureme",
|
||||||
"memoffset",
|
"memoffset 0.9.0",
|
||||||
"rustc-rayon-core",
|
"rustc-rayon-core",
|
||||||
"rustc_ast",
|
"rustc_ast",
|
||||||
"rustc_data_structures",
|
"rustc_data_structures",
|
||||||
|
|
|
@ -953,8 +953,8 @@ pub trait LintContext: Sized {
|
||||||
db.span_label(duplicate_reexport_span, format!("but the name `{}` in the {} namespace is also re-exported here", name, namespace));
|
db.span_label(duplicate_reexport_span, format!("but the name `{}` in the {} namespace is also re-exported here", name, namespace));
|
||||||
}
|
}
|
||||||
BuiltinLintDiagnostics::HiddenGlobReexports { name, namespace, glob_reexport_span, private_item_span } => {
|
BuiltinLintDiagnostics::HiddenGlobReexports { name, namespace, glob_reexport_span, private_item_span } => {
|
||||||
db.span_label(glob_reexport_span, format!("the name `{}` in the {} namespace is supposed to be publicly re-exported here", name, namespace));
|
db.span_note(glob_reexport_span, format!("the name `{}` in the {} namespace is supposed to be publicly re-exported here", name, namespace));
|
||||||
db.span_label(private_item_span, "but the private item here shadows it");
|
db.span_note(private_item_span, "but the private item here shadows it".to_owned());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Rewrap `db`, and pass control to the user.
|
// Rewrap `db`, and pass control to the user.
|
||||||
|
|
|
@ -7,7 +7,6 @@ edition = "2021"
|
||||||
|
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
memoffset = { version = "0.8.0", features = ["unstable_const"] }
|
|
||||||
field-offset = "0.3.5"
|
field-offset = "0.3.5"
|
||||||
measureme = "10.0.0"
|
measureme = "10.0.0"
|
||||||
rustc_ast = { path = "../rustc_ast" }
|
rustc_ast = { path = "../rustc_ast" }
|
||||||
|
@ -25,5 +24,8 @@ rustc_span = { path = "../rustc_span" }
|
||||||
thin-vec = "0.2.12"
|
thin-vec = "0.2.12"
|
||||||
tracing = "0.1"
|
tracing = "0.1"
|
||||||
|
|
||||||
|
# Not used directly, but included to enable the unstable_offset_of feature
|
||||||
|
memoffset = { version = "0.9.0", features = ["unstable_offset_of"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
rustc_use_parallel_compiler = ["rustc-rayon-core", "rustc_query_system/rustc_use_parallel_compiler"]
|
rustc_use_parallel_compiler = ["rustc-rayon-core", "rustc_query_system/rustc_use_parallel_compiler"]
|
||||||
|
|
|
@ -18,6 +18,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
||||||
- `x.py fmt` now formats only files modified between the merge-base of HEAD and the last commit in the master branch of the rust-lang repository and the current working directory. To restore old behaviour, use `x.py fmt .`. The check mode is not affected by this change. [#105702](https://github.com/rust-lang/rust/pull/105702)
|
- `x.py fmt` now formats only files modified between the merge-base of HEAD and the last commit in the master branch of the rust-lang repository and the current working directory. To restore old behaviour, use `x.py fmt .`. The check mode is not affected by this change. [#105702](https://github.com/rust-lang/rust/pull/105702)
|
||||||
- The `llvm.version-check` config option has been removed. Older versions were never supported. If you still need to support older versions (e.g. you are applying custom patches), patch `check_llvm_version` in bootstrap to change the minimum version. [#108619](https://github.com/rust-lang/rust/pull/108619)
|
- The `llvm.version-check` config option has been removed. Older versions were never supported. If you still need to support older versions (e.g. you are applying custom patches), patch `check_llvm_version` in bootstrap to change the minimum version. [#108619](https://github.com/rust-lang/rust/pull/108619)
|
||||||
- The `rust.ignore-git` option has been renamed to `rust.omit-git-hash`. [#110059](https://github.com/rust-lang/rust/pull/110059)
|
- The `rust.ignore-git` option has been renamed to `rust.omit-git-hash`. [#110059](https://github.com/rust-lang/rust/pull/110059)
|
||||||
|
- `--exclude` no longer accepts a `Kind` as part of a Step; instead it uses the top-level Kind of the subcommand. If this matches how you were already using --exclude (e.g. `x test --exclude test::std`), simply remove the kind: `--exclude std`. If you were using a kind that did not match the top-level subcommand, please open an issue explaining why you wanted this feature.
|
||||||
|
|
||||||
### Non-breaking changes
|
### Non-breaking changes
|
||||||
|
|
||||||
|
|
|
@ -8,7 +8,7 @@ use std::fs::{self, File};
|
||||||
use std::hash::Hash;
|
use std::hash::Hash;
|
||||||
use std::io::{BufRead, BufReader};
|
use std::io::{BufRead, BufReader};
|
||||||
use std::ops::Deref;
|
use std::ops::Deref;
|
||||||
use std::path::{Component, Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::time::{Duration, Instant};
|
use std::time::{Duration, Instant};
|
||||||
|
|
||||||
|
@ -150,29 +150,6 @@ pub struct TaskPath {
|
||||||
pub kind: Option<Kind>,
|
pub kind: Option<Kind>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl TaskPath {
|
|
||||||
pub fn parse(path: impl Into<PathBuf>) -> TaskPath {
|
|
||||||
let mut kind = None;
|
|
||||||
let mut path = path.into();
|
|
||||||
|
|
||||||
let mut components = path.components();
|
|
||||||
if let Some(Component::Normal(os_str)) = components.next() {
|
|
||||||
if let Some(str) = os_str.to_str() {
|
|
||||||
if let Some((found_kind, found_prefix)) = str.split_once("::") {
|
|
||||||
if found_kind.is_empty() {
|
|
||||||
panic!("empty kind in task path {}", path.display());
|
|
||||||
}
|
|
||||||
kind = Kind::parse(found_kind);
|
|
||||||
assert!(kind.is_some());
|
|
||||||
path = Path::new(found_prefix).join(components.as_path());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TaskPath { path, kind }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl Debug for TaskPath {
|
impl Debug for TaskPath {
|
||||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||||
if let Some(kind) = &self.kind {
|
if let Some(kind) = &self.kind {
|
||||||
|
@ -216,7 +193,7 @@ impl PathSet {
|
||||||
PathSet::Set(set)
|
PathSet::Set(set)
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has(&self, needle: &Path, module: Option<Kind>) -> bool {
|
fn has(&self, needle: &Path, module: Kind) -> bool {
|
||||||
match self {
|
match self {
|
||||||
PathSet::Set(set) => set.iter().any(|p| Self::check(p, needle, module)),
|
PathSet::Set(set) => set.iter().any(|p| Self::check(p, needle, module)),
|
||||||
PathSet::Suite(suite) => Self::check(suite, needle, module),
|
PathSet::Suite(suite) => Self::check(suite, needle, module),
|
||||||
|
@ -224,9 +201,9 @@ impl PathSet {
|
||||||
}
|
}
|
||||||
|
|
||||||
// internal use only
|
// internal use only
|
||||||
fn check(p: &TaskPath, needle: &Path, module: Option<Kind>) -> bool {
|
fn check(p: &TaskPath, needle: &Path, module: Kind) -> bool {
|
||||||
if let (Some(p_kind), Some(kind)) = (&p.kind, module) {
|
if let Some(p_kind) = &p.kind {
|
||||||
p.path.ends_with(needle) && *p_kind == kind
|
p.path.ends_with(needle) && *p_kind == module
|
||||||
} else {
|
} else {
|
||||||
p.path.ends_with(needle)
|
p.path.ends_with(needle)
|
||||||
}
|
}
|
||||||
|
@ -238,11 +215,7 @@ impl PathSet {
|
||||||
/// This is used for `StepDescription::krate`, which passes all matching crates at once to
|
/// This is used for `StepDescription::krate`, which passes all matching crates at once to
|
||||||
/// `Step::make_run`, rather than calling it many times with a single crate.
|
/// `Step::make_run`, rather than calling it many times with a single crate.
|
||||||
/// See `tests.rs` for examples.
|
/// See `tests.rs` for examples.
|
||||||
fn intersection_removing_matches(
|
fn intersection_removing_matches(&self, needles: &mut Vec<&Path>, module: Kind) -> PathSet {
|
||||||
&self,
|
|
||||||
needles: &mut Vec<&Path>,
|
|
||||||
module: Option<Kind>,
|
|
||||||
) -> PathSet {
|
|
||||||
let mut check = |p| {
|
let mut check = |p| {
|
||||||
for (i, n) in needles.iter().enumerate() {
|
for (i, n) in needles.iter().enumerate() {
|
||||||
let matched = Self::check(p, n, module);
|
let matched = Self::check(p, n, module);
|
||||||
|
@ -307,7 +280,7 @@ impl StepDescription {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
|
fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
|
||||||
if builder.config.exclude.iter().any(|e| pathset.has(&e.path, e.kind)) {
|
if builder.config.exclude.iter().any(|e| pathset.has(&e, builder.kind)) {
|
||||||
println!("Skipping {:?} because it is excluded", pathset);
|
println!("Skipping {:?} because it is excluded", pathset);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -562,7 +535,7 @@ impl<'a> ShouldRun<'a> {
|
||||||
) -> Vec<PathSet> {
|
) -> Vec<PathSet> {
|
||||||
let mut sets = vec![];
|
let mut sets = vec![];
|
||||||
for pathset in &self.paths {
|
for pathset in &self.paths {
|
||||||
let subset = pathset.intersection_removing_matches(paths, Some(kind));
|
let subset = pathset.intersection_removing_matches(paths, kind);
|
||||||
if subset != PathSet::empty() {
|
if subset != PathSet::empty() {
|
||||||
sets.push(subset);
|
sets.push(subset);
|
||||||
}
|
}
|
||||||
|
@ -2138,7 +2111,7 @@ impl<'a> Builder<'a> {
|
||||||
let should_run = (desc.should_run)(ShouldRun::new(self, desc.kind));
|
let should_run = (desc.should_run)(ShouldRun::new(self, desc.kind));
|
||||||
|
|
||||||
for path in &self.paths {
|
for path in &self.paths {
|
||||||
if should_run.paths.iter().any(|s| s.has(path, Some(desc.kind)))
|
if should_run.paths.iter().any(|s| s.has(path, desc.kind))
|
||||||
&& !desc.is_excluded(
|
&& !desc.is_excluded(
|
||||||
self,
|
self,
|
||||||
&PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind) }),
|
&PathSet::Suite(TaskPath { path: path.clone(), kind: Some(desc.kind) }),
|
||||||
|
|
|
@ -101,23 +101,21 @@ fn test_invalid() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_intersection() {
|
fn test_intersection() {
|
||||||
let set = PathSet::Set(
|
let set = |paths: &[&str]| {
|
||||||
["library/core", "library/alloc", "library/std"].into_iter().map(TaskPath::parse).collect(),
|
PathSet::Set(paths.into_iter().map(|p| TaskPath { path: p.into(), kind: None }).collect())
|
||||||
);
|
};
|
||||||
|
let library_set = set(&["library/core", "library/alloc", "library/std"]);
|
||||||
let mut command_paths =
|
let mut command_paths =
|
||||||
vec![Path::new("library/core"), Path::new("library/alloc"), Path::new("library/stdarch")];
|
vec![Path::new("library/core"), Path::new("library/alloc"), Path::new("library/stdarch")];
|
||||||
let subset = set.intersection_removing_matches(&mut command_paths, None);
|
let subset = library_set.intersection_removing_matches(&mut command_paths, Kind::Build);
|
||||||
assert_eq!(
|
assert_eq!(subset, set(&["library/core", "library/alloc"]),);
|
||||||
subset,
|
|
||||||
PathSet::Set(["library/core", "library/alloc"].into_iter().map(TaskPath::parse).collect())
|
|
||||||
);
|
|
||||||
assert_eq!(command_paths, vec![Path::new("library/stdarch")]);
|
assert_eq!(command_paths, vec![Path::new("library/stdarch")]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_exclude() {
|
fn test_exclude() {
|
||||||
let mut config = configure("test", &["A"], &["A"]);
|
let mut config = configure("test", &["A"], &["A"]);
|
||||||
config.exclude = vec![TaskPath::parse("src/tools/tidy")];
|
config.exclude = vec!["src/tools/tidy".into()];
|
||||||
let cache = run_build(&[], config);
|
let cache = run_build(&[], config);
|
||||||
|
|
||||||
// Ensure we have really excluded tidy
|
// Ensure we have really excluded tidy
|
||||||
|
@ -129,21 +127,16 @@ fn test_exclude() {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_exclude_kind() {
|
fn test_exclude_kind() {
|
||||||
let path = PathBuf::from("src/tools/cargotest");
|
let path = PathBuf::from("compiler/rustc_data_structures");
|
||||||
let exclude = TaskPath::parse("test::src/tools/cargotest");
|
|
||||||
assert_eq!(exclude, TaskPath { kind: Some(Kind::Test), path: path.clone() });
|
|
||||||
|
|
||||||
let mut config = configure("test", &["A"], &["A"]);
|
let mut config = configure("test", &["A"], &["A"]);
|
||||||
// Ensure our test is valid, and `test::Cargotest` would be run without the exclude.
|
// Ensure our test is valid, and `test::Rustc` would be run without the exclude.
|
||||||
assert!(run_build(&[path.clone()], config.clone()).contains::<test::Cargotest>());
|
assert!(run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
|
||||||
// Ensure tests for cargotest are skipped.
|
// Ensure tests for rustc are skipped.
|
||||||
config.exclude = vec![exclude.clone()];
|
config.exclude = vec![path.clone()];
|
||||||
assert!(!run_build(&[path.clone()], config).contains::<test::Cargotest>());
|
assert!(!run_build(&[], config.clone()).contains::<test::CrateLibrustc>());
|
||||||
|
// Ensure builds for rustc are not skipped.
|
||||||
// Ensure builds for cargotest are not skipped.
|
assert!(run_build(&[], config).contains::<compile::Rustc>());
|
||||||
let mut config = configure("build", &["A"], &["A"]);
|
|
||||||
config.exclude = vec![exclude];
|
|
||||||
assert!(run_build(&[path], config).contains::<tool::CargoTest>());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Ensure that if someone passes both a single crate and `library`, all library crates get built.
|
/// Ensure that if someone passes both a single crate and `library`, all library crates get built.
|
||||||
|
|
|
@ -17,7 +17,6 @@ use std::path::{Path, PathBuf};
|
||||||
use std::process::Command;
|
use std::process::Command;
|
||||||
use std::str::FromStr;
|
use std::str::FromStr;
|
||||||
|
|
||||||
use crate::builder::TaskPath;
|
|
||||||
use crate::cache::{Interned, INTERNER};
|
use crate::cache::{Interned, INTERNER};
|
||||||
use crate::cc_detect::{ndk_compiler, Language};
|
use crate::cc_detect::{ndk_compiler, Language};
|
||||||
use crate::channel::{self, GitInfo};
|
use crate::channel::{self, GitInfo};
|
||||||
|
@ -80,7 +79,7 @@ pub struct Config {
|
||||||
pub sanitizers: bool,
|
pub sanitizers: bool,
|
||||||
pub profiler: bool,
|
pub profiler: bool,
|
||||||
pub omit_git_hash: bool,
|
pub omit_git_hash: bool,
|
||||||
pub exclude: Vec<TaskPath>,
|
pub exclude: Vec<PathBuf>,
|
||||||
pub include_default_paths: bool,
|
pub include_default_paths: bool,
|
||||||
pub rustc_error_format: Option<String>,
|
pub rustc_error_format: Option<String>,
|
||||||
pub json_output: bool,
|
pub json_output: bool,
|
||||||
|
@ -957,7 +956,7 @@ impl Config {
|
||||||
|
|
||||||
// Set flags.
|
// Set flags.
|
||||||
config.paths = std::mem::take(&mut flags.paths);
|
config.paths = std::mem::take(&mut flags.paths);
|
||||||
config.exclude = flags.exclude.into_iter().map(|path| TaskPath::parse(path)).collect();
|
config.exclude = flags.exclude;
|
||||||
config.include_default_paths = flags.include_default_paths;
|
config.include_default_paths = flags.include_default_paths;
|
||||||
config.rustc_error_format = flags.rustc_error_format;
|
config.rustc_error_format = flags.rustc_error_format;
|
||||||
config.json_output = flags.json_output;
|
config.json_output = flags.json_output;
|
||||||
|
|
|
@ -1537,7 +1537,7 @@ note: if you're sure you want to do this, please open an issue as to why. In the
|
||||||
|
|
||||||
for exclude in &builder.config.exclude {
|
for exclude in &builder.config.exclude {
|
||||||
cmd.arg("--skip");
|
cmd.arg("--skip");
|
||||||
cmd.arg(&exclude.path);
|
cmd.arg(&exclude);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get paths from cmd args
|
// Get paths from cmd args
|
||||||
|
|
|
@ -270,7 +270,7 @@ For targets: `loongarch64-unknown-linux-gnu`
|
||||||
- Operating System > Linux kernel version = 5.19.16
|
- Operating System > Linux kernel version = 5.19.16
|
||||||
- Binary utilities > Version of binutils = 2.40
|
- Binary utilities > Version of binutils = 2.40
|
||||||
- C-library > glibc version = 2.36
|
- C-library > glibc version = 2.36
|
||||||
- C compiler > gcc version = 12.2.0
|
- C compiler > gcc version = 13.1.0
|
||||||
- C compiler > C++ = ENABLE -- to cross compile LLVM
|
- C compiler > C++ = ENABLE -- to cross compile LLVM
|
||||||
|
|
||||||
### `mips-linux-gnu.defconfig`
|
### `mips-linux-gnu.defconfig`
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
set -ex
|
set -ex
|
||||||
|
|
||||||
URL=https://github.com/crosstool-ng/crosstool-ng
|
URL=https://github.com/crosstool-ng/crosstool-ng
|
||||||
REV=943364711a650d9b9e84c1b42c91cc0265b6ab5c
|
REV=227d99d7f3115f3a078595a580d2b307dcd23e93
|
||||||
|
|
||||||
mkdir crosstool-ng
|
mkdir crosstool-ng
|
||||||
cd crosstool-ng
|
cd crosstool-ng
|
||||||
|
|
|
@ -6,10 +6,10 @@ pub mod upstream_a {
|
||||||
pub struct Bar {}
|
pub struct Bar {}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub use self::inner::*;
|
|
||||||
|
|
||||||
struct Foo;
|
struct Foo;
|
||||||
//~^ WARN private item shadows public glob re-export
|
//~^ WARN private item shadows public glob re-export
|
||||||
|
|
||||||
|
pub use self::inner::*;
|
||||||
}
|
}
|
||||||
|
|
||||||
pub mod upstream_b {
|
pub mod upstream_b {
|
||||||
|
|
|
@ -1,31 +1,54 @@
|
||||||
warning: private item shadows public glob re-export
|
warning: private item shadows public glob re-export
|
||||||
--> $DIR/hidden_glob_reexports.rs:11:5
|
--> $DIR/hidden_glob_reexports.rs:9:5
|
||||||
|
|
|
||||||
|
LL | struct Foo;
|
||||||
|
| ^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
note: the name `Foo` in the type namespace is supposed to be publicly re-exported here
|
||||||
|
--> $DIR/hidden_glob_reexports.rs:12:13
|
||||||
|
|
|
|
||||||
LL | pub use self::inner::*;
|
LL | pub use self::inner::*;
|
||||||
| -------------- the name `Foo` in the type namespace is supposed to be publicly re-exported here
|
| ^^^^^^^^^^^^^^
|
||||||
LL |
|
note: but the private item here shadows it
|
||||||
LL | struct Foo;
|
--> $DIR/hidden_glob_reexports.rs:9:5
|
||||||
| ^^^^^^^^^^^ but the private item here shadows it
|
|
||||||
|
|
|
|
||||||
|
LL | struct Foo;
|
||||||
|
| ^^^^^^^^^^^
|
||||||
= note: `#[warn(hidden_glob_reexports)]` on by default
|
= note: `#[warn(hidden_glob_reexports)]` on by default
|
||||||
|
|
||||||
warning: private item shadows public glob re-export
|
warning: private item shadows public glob re-export
|
||||||
--> $DIR/hidden_glob_reexports.rs:27:9
|
--> $DIR/hidden_glob_reexports.rs:27:9
|
||||||
|
|
|
|
||||||
LL | pub use self::inner::*;
|
|
||||||
| -------------- the name `Foo` in the type namespace is supposed to be publicly re-exported here
|
|
||||||
LL |
|
|
||||||
LL | use self::other::Foo;
|
LL | use self::other::Foo;
|
||||||
| ^^^^^^^^^^^^^^^^ but the private item here shadows it
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
note: the name `Foo` in the type namespace is supposed to be publicly re-exported here
|
||||||
|
--> $DIR/hidden_glob_reexports.rs:25:13
|
||||||
|
|
|
||||||
|
LL | pub use self::inner::*;
|
||||||
|
| ^^^^^^^^^^^^^^
|
||||||
|
note: but the private item here shadows it
|
||||||
|
--> $DIR/hidden_glob_reexports.rs:27:9
|
||||||
|
|
|
||||||
|
LL | use self::other::Foo;
|
||||||
|
| ^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: private item shadows public glob re-export
|
warning: private item shadows public glob re-export
|
||||||
--> $DIR/hidden_glob_reexports.rs:40:9
|
--> $DIR/hidden_glob_reexports.rs:40:9
|
||||||
|
|
|
|
||||||
LL | pub use self::no_def_id::*;
|
|
||||||
| ------------------ the name `u8` in the type namespace is supposed to be publicly re-exported here
|
|
||||||
LL |
|
|
||||||
LL | use std::primitive::u8;
|
LL | use std::primitive::u8;
|
||||||
| ^^^^^^^^^^^^^^^^^^ but the private item here shadows it
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
|
||||||
|
note: the name `u8` in the type namespace is supposed to be publicly re-exported here
|
||||||
|
--> $DIR/hidden_glob_reexports.rs:38:13
|
||||||
|
|
|
||||||
|
LL | pub use self::no_def_id::*;
|
||||||
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
note: but the private item here shadows it
|
||||||
|
--> $DIR/hidden_glob_reexports.rs:40:9
|
||||||
|
|
|
||||||
|
LL | use std::primitive::u8;
|
||||||
|
| ^^^^^^^^^^^^^^^^^^
|
||||||
|
|
||||||
warning: 3 warnings emitted
|
warning: 3 warnings emitted
|
||||||
|
|
||||||
|
|
20
x.py
20
x.py
|
@ -9,12 +9,17 @@
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import warnings
|
||||||
|
from inspect import cleandoc
|
||||||
|
|
||||||
|
major = sys.version_info.major
|
||||||
|
minor = sys.version_info.minor
|
||||||
|
|
||||||
# If this is python2, check if python3 is available and re-execute with that
|
# If this is python2, check if python3 is available and re-execute with that
|
||||||
# interpreter. Only python3 allows downloading CI LLVM.
|
# interpreter. Only python3 allows downloading CI LLVM.
|
||||||
#
|
#
|
||||||
# This matters if someone's system `python` is python2.
|
# This matters if someone's system `python` is python2.
|
||||||
if sys.version_info.major < 3:
|
if major < 3:
|
||||||
try:
|
try:
|
||||||
os.execvp("py", ["py", "-3"] + sys.argv)
|
os.execvp("py", ["py", "-3"] + sys.argv)
|
||||||
except OSError:
|
except OSError:
|
||||||
|
@ -24,6 +29,19 @@ if __name__ == '__main__':
|
||||||
# Python 3 isn't available, fall back to python 2
|
# Python 3 isn't available, fall back to python 2
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
# soft deprecation of old python versions
|
||||||
|
skip_check = os.environ.get("RUST_IGNORE_OLD_PYTHON") == "1"
|
||||||
|
if major < 3 or (major == 3 and minor < 6):
|
||||||
|
msg = cleandoc("""
|
||||||
|
Using python {}.{} but >= 3.6 is recommended. Your python version
|
||||||
|
should continue to work for the near future, but this will
|
||||||
|
eventually change. If python >= 3.6 is not available on your system,
|
||||||
|
please file an issue to help us understand timelines.
|
||||||
|
|
||||||
|
This message can be suppressed by setting `RUST_IGNORE_OLD_PYTHON=1`
|
||||||
|
""".format(major, minor))
|
||||||
|
warnings.warn(msg)
|
||||||
|
|
||||||
rust_dir = os.path.dirname(os.path.abspath(__file__))
|
rust_dir = os.path.dirname(os.path.abspath(__file__))
|
||||||
# For the import below, have Python search in src/bootstrap first.
|
# For the import below, have Python search in src/bootstrap first.
|
||||||
sys.path.insert(0, os.path.join(rust_dir, "src", "bootstrap"))
|
sys.path.insert(0, os.path.join(rust_dir, "src", "bootstrap"))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue