Skip to content

Commit 3f392aa

Browse files
committed
Auto merge of #3713 - rust-lang:rustup-2024-06-27, r=RalfJung
Automatic Rustup
2 parents 5011017 + fee0430 commit 3f392aa

File tree

5 files changed

+23
-4
lines changed

5 files changed

+23
-4
lines changed

build.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
fn main() {
22
// Don't rebuild miri when nothing changed.
33
println!("cargo:rerun-if-changed=build.rs");
4-
// Re-export the TARGET environment variable so it can
5-
// be accessed by miri.
4+
// Re-export the TARGET environment variable so it can be accessed by miri. Needed to know the
5+
// "host" triple inside Miri.
66
let target = std::env::var("TARGET").unwrap();
77
println!("cargo:rustc-env=TARGET={target}");
8+
// Allow some cfgs.
9+
println!("cargo::rustc-check-cfg=cfg(bootstrap)");
810
}

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c290e9de32e8ba6a673ef125fde40eadd395d170
1+
7033f9b14a37f4a00766d6c01326600b31f3a716

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#![feature(yeet_expr)]
1111
#![feature(nonzero_ops)]
1212
#![feature(let_chains)]
13-
#![feature(lint_reasons)]
13+
#![cfg_attr(bootstrap, feature(lint_reasons))]
1414
#![feature(trait_upcasting)]
1515
#![feature(strict_overflow_ops)]
1616
#![feature(is_none_or)]

tests/pass/tls/win_tls_callback.rs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//! Ensure that we call Windows TLS callbacks in the local crate.
2+
//@only-target-windows
3+
// Calling eprintln in the callback seems to (re-)initialize some thread-local storage
4+
// and then leak the memory allocated for that. Let's just ignore these leaks,
5+
// that's not what this test is about.
6+
//@compile-flags: -Zmiri-ignore-leaks
7+
8+
#[link_section = ".CRT$XLB"]
9+
#[used] // Miri only considers explicitly `#[used]` statics for `lookup_link_section`
10+
pub static CALLBACK: unsafe extern "system" fn(*const (), u32, *const ()) = tls_callback;
11+
12+
unsafe extern "system" fn tls_callback(_h: *const (), _dw_reason: u32, _pv: *const ()) {
13+
eprintln!("in tls_callback");
14+
}
15+
16+
fn main() {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
in tls_callback

0 commit comments

Comments
 (0)