You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #119558 - matthiaskrgr:rollup-ghm80lp, r=matthiaskrgr
Rollup of 7 pull requests
Successful merges:
- #117449 (Avoid silencing relevant follow-up errors)
- #117556 (Disallow reference to `static mut` and adding `static_mut_ref` lint)
- #118521 (Enable address sanitizer for MSVC targets using INFERASANLIBS linker flag)
- #118704 (Promote `riscv32{im|imafc}` targets to tier 2)
- #119026 (std::net::bind using -1 for openbsd which in turn sets it to somaxconn.)
- #119151 (Hide foreign `#[doc(hidden)]` paths in import suggestions)
- #119195 (Make named_asm_labels lint not trigger on unicode and trigger on format args)
r? `@ghost`
`@rustbot` modify labels: rollup
Copy file name to clipboardExpand all lines: compiler/rustc_hir_analysis/messages.ftl
+14
Original file line number
Diff line number
Diff line change
@@ -346,6 +346,20 @@ hir_analysis_start_not_target_feature = `#[start]` function is not allowed to ha
346
346
hir_analysis_start_not_track_caller = `#[start]` function is not allowed to be `#[track_caller]`
347
347
.label = `#[start]` function is not allowed to be `#[track_caller]`
348
348
349
+
hir_analysis_static_mut_ref = reference of mutable static is disallowed
350
+
.label = reference of mutable static
351
+
.note = mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
352
+
.suggestion = shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
353
+
.suggestion_mut = mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
354
+
355
+
hir_analysis_static_mut_ref_lint = {$shared}reference of mutable static is discouraged
356
+
.label = shared reference of mutable static
357
+
.label_mut = mutable reference of mutable static
358
+
.suggestion = shared references are dangerous since if there's any kind of mutation of that static while the reference lives, that's UB; use `addr_of!` instead to create a raw pointer
359
+
.suggestion_mut = mutable references are dangerous since if there's any other pointer or reference used for that static while the reference lives, that's UB; use `addr_of_mut!` instead to create a raw pointer
360
+
.note = reference of mutable static is a hard error from 2024 edition
361
+
.why_note = mutable statics can be written to by multiple threads: aliasing violations or data races will cause undefined behavior
362
+
349
363
hir_analysis_static_specialize = cannot specialize on `'static` lifetime
350
364
351
365
hir_analysis_substs_on_overridden_impl = could not resolve substs on overridden impl
0 commit comments