Skip to content

Commit 9ce839e

Browse files
committed
Auto merge of rust-lang#140012 - matthiaskrgr:rollup-6fceiyg, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang#137454 (not lint break with label and unsafe block) - rust-lang#138934 (support config extensions) - rust-lang#139297 (Deduplicate & clean up Nix shell) - rust-lang#139834 (Don't canonicalize crate paths) - rust-lang#139868 (Move `pal::env` into `std::sys::env_consts`) - rust-lang#139978 (Add citool command for generating a test dashboard) - rust-lang#140000 (skip llvm-config in autodiff check builds, when its unavailable) - rust-lang#140007 (Disable has_thread_local on i686-win7-windows-msvc) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 191df20 + 318226a commit 9ce839e

File tree

53 files changed

+1292
-292
lines changed

Some content is hidden

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

53 files changed

+1292
-292
lines changed

Diff for: bootstrap.example.toml

+8
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,14 @@
1919
# Note that this has no default value (x.py uses the defaults in `bootstrap.example.toml`).
2020
#profile = <none>
2121

22+
# Inherits configuration values from different configuration files (a.k.a. config extensions).
23+
# Supports absolute paths, and uses the current directory (where the bootstrap was invoked)
24+
# as the base if the given path is not absolute.
25+
#
26+
# The overriding logic follows a right-to-left order. For example, in `include = ["a.toml", "b.toml"]`,
27+
# extension `b.toml` overrides `a.toml`. Also, parent extensions always overrides the inner ones.
28+
#include = []
29+
2230
# Keeps track of major changes made to this configuration.
2331
#
2432
# This value also represents ID of the PR that caused major changes. Meaning,

Diff for: compiler/rustc_metadata/src/locator.rs

+15-6
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,21 @@ impl<'a> CrateLocator<'a> {
427427

428428
let (rlibs, rmetas, dylibs) =
429429
candidates.entry(hash.to_string()).or_default();
430-
let path =
431-
try_canonicalize(&spf.path).unwrap_or_else(|_| spf.path.to_path_buf());
432-
if seen_paths.contains(&path) {
433-
continue;
434-
};
435-
seen_paths.insert(path.clone());
430+
{
431+
// As a perforamnce optimisation we canonicalize the path and skip
432+
// ones we've already seeen. This allows us to ignore crates
433+
// we know are exactual equal to ones we've already found.
434+
// Going to the same crate through different symlinks does not change the result.
435+
let path = try_canonicalize(&spf.path)
436+
.unwrap_or_else(|_| spf.path.to_path_buf());
437+
if seen_paths.contains(&path) {
438+
continue;
439+
};
440+
seen_paths.insert(path);
441+
}
442+
// Use the original path (potentially with unresolved symlinks),
443+
// filesystem code should not care, but this is nicer for diagnostics.
444+
let path = spf.path.to_path_buf();
436445
match kind {
437446
CrateFlavor::Rlib => rlibs.insert(path, search_path.kind),
438447
CrateFlavor::Rmeta => rmetas.insert(path, search_path.kind),

Diff for: compiler/rustc_parse/src/parser/expr.rs

+8-6
Original file line numberDiff line numberDiff line change
@@ -1884,13 +1884,15 @@ impl<'a> Parser<'a> {
18841884
let mut expr = self.parse_expr_opt()?;
18851885
if let Some(expr) = &mut expr {
18861886
if label.is_some()
1887-
&& matches!(
1888-
expr.kind,
1887+
&& match &expr.kind {
18891888
ExprKind::While(_, _, None)
1890-
| ExprKind::ForLoop { label: None, .. }
1891-
| ExprKind::Loop(_, None, _)
1892-
| ExprKind::Block(_, None)
1893-
)
1889+
| ExprKind::ForLoop { label: None, .. }
1890+
| ExprKind::Loop(_, None, _) => true,
1891+
ExprKind::Block(block, None) => {
1892+
matches!(block.rules, BlockCheckMode::Default)
1893+
}
1894+
_ => false,
1895+
}
18941896
{
18951897
self.psess.buffer_lint(
18961898
BREAK_WITH_LABEL_AND_LOOP,

Diff for: compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs

+6
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ pub(crate) fn target() -> Target {
77
base.cpu = "pentium4".into();
88
base.max_atomic_width = Some(64);
99
base.supported_sanitizers = SanitizerSet::ADDRESS;
10+
// On Windows 7 32-bit, the alignment characteristic of the TLS Directory
11+
// don't appear to be respected by the PE Loader, leading to crashes. As
12+
// a result, let's disable has_thread_local to make sure TLS goes through
13+
// the emulation layer.
14+
// See https://github.com/rust-lang/rust/issues/138903
15+
base.has_thread_local = false;
1016

1117
base.add_pre_link_args(
1218
LinkerFlavor::Msvc(Lld::No),

Diff for: library/std/src/env.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ impl fmt::Debug for ArgsOs {
950950
/// Constants associated with the current target
951951
#[stable(feature = "env", since = "1.0.0")]
952952
pub mod consts {
953-
use crate::sys::env::os;
953+
use crate::sys::env_consts::os;
954954

955955
/// A string describing the architecture of the CPU that is currently in use.
956956
/// An example value may be: `"x86"`, `"arm"` or `"riscv64"`.

0 commit comments

Comments
 (0)