diff options
| author | bors <bors@rust-lang.org> | 2025-04-19 16:03:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-04-19 16:03:34 +0000 |
| commit | 077cedc2afa8ac0b727b7a6cbe012940ba228deb (patch) | |
| tree | 8071bf6a1c05c6114d729698a9b9fc25d60d921e /compiler | |
| parent | a7c39b68616668a45f0afd62849a1da7c8ad2516 (diff) | |
| parent | 9ebc73e2b62cfd2c678b84bfad9e6cf86a315a97 (diff) | |
| download | rust-077cedc2afa8ac0b727b7a6cbe012940ba228deb.tar.gz rust-077cedc2afa8ac0b727b7a6cbe012940ba228deb.zip | |
Auto merge of #140040 - ChrisDenton:rollup-56bzfuq, r=ChrisDenton
Rollup of 8 pull requests Successful merges: - #137454 (not lint break with label and unsafe block) - #139297 (Deduplicate & clean up Nix shell) - #139535 (Implement `Default` for raw pointers) - #139919 (Make rustdoc JSON Span column 1-based, just like line numbers) - #139922 (fix incorrect type in cstr `to_string_lossy()` docs) - #140007 (Disable has_thread_local on i686-win7-windows-msvc) - #140016 (std: Use fstatat() on illumos) - #140025 (Re-remove `AdtFlags::IS_ANONYMOUS`) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_middle/src/ty/adt.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_parse/src/parser/expr.rs | 14 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs | 6 |
3 files changed, 14 insertions, 8 deletions
diff --git a/compiler/rustc_middle/src/ty/adt.rs b/compiler/rustc_middle/src/ty/adt.rs index 66517c97a68..d92b4f9c06b 100644 --- a/compiler/rustc_middle/src/ty/adt.rs +++ b/compiler/rustc_middle/src/ty/adt.rs @@ -55,8 +55,6 @@ bitflags::bitflags! { const IS_UNSAFE_CELL = 1 << 9; /// Indicates whether the type is `UnsafePinned`. const IS_UNSAFE_PINNED = 1 << 10; - /// Indicates whether the type is anonymous. - const IS_ANONYMOUS = 1 << 11; } } rustc_data_structures::external_bitflags_debug! { AdtFlags } diff --git a/compiler/rustc_parse/src/parser/expr.rs b/compiler/rustc_parse/src/parser/expr.rs index df44b3cc23c..71cc814cb50 100644 --- a/compiler/rustc_parse/src/parser/expr.rs +++ b/compiler/rustc_parse/src/parser/expr.rs @@ -1884,13 +1884,15 @@ impl<'a> Parser<'a> { let mut expr = self.parse_expr_opt()?; if let Some(expr) = &mut expr { if label.is_some() - && matches!( - expr.kind, + && match &expr.kind { ExprKind::While(_, _, None) - | ExprKind::ForLoop { label: None, .. } - | ExprKind::Loop(_, None, _) - | ExprKind::Block(_, None) - ) + | ExprKind::ForLoop { label: None, .. } + | ExprKind::Loop(_, None, _) => true, + ExprKind::Block(block, None) => { + matches!(block.rules, BlockCheckMode::Default) + } + _ => false, + } { self.psess.buffer_lint( BREAK_WITH_LABEL_AND_LOOP, diff --git a/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs index 233a1c4fd7a..91ab3111097 100644 --- a/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs @@ -7,6 +7,12 @@ pub(crate) fn target() -> Target { base.cpu = "pentium4".into(); base.max_atomic_width = Some(64); base.supported_sanitizers = SanitizerSet::ADDRESS; + // On Windows 7 32-bit, the alignment characteristic of the TLS Directory + // don't appear to be respected by the PE Loader, leading to crashes. As + // a result, let's disable has_thread_local to make sure TLS goes through + // the emulation layer. + // See https://github.com/rust-lang/rust/issues/138903 + base.has_thread_local = false; base.add_pre_link_args( LinkerFlavor::Msvc(Lld::No), |
