bors
5ba6db1b64
Auto merge of #124895 - obeis:static-mut-hidden-ref, r=compiler-errors
...
Disallow hidden references to mutable static
Closes #123060
Tracking:
- https://github.com/rust-lang/rust/issues/123758
2024-09-20 17:25:34 +00:00
Ralf Jung
3175cc2814
stabilize const_mut_refs
2024-09-15 09:51:32 +02:00
Obei Sideg
3b0ce1bc33
Update tests for hidden references to mutable static
2024-09-13 14:10:56 +03:00
Alex Crichton
75fa9f6dec
compiletest: Add a //@ needs-threads
directive
...
This commit is extracted from #122036 and adds a new directive to the
`compiletest` test runner, `//@ needs-threads`. This is intended to
capture the need that a target must implement threading to execute a
specific test, typically one that uses `std::thread`. This is primarily
done for WebAssembly targets which currently do not have threads by
default. This enables transitioning a lot of `//@ ignore-wasm*`-style
ignores into a more self-documenting `//@ needs-threads` directive.
Additionally the `wasm32-wasi-preview1-threads` target, for example,
does actually have threads, but isn't tested in CI at this time. This
change enables running these tests for that target, but not other wasm
targets.
2024-03-06 12:35:07 -08:00
Obei Sideg
408eeae59d
Improve wording of static_mut_ref
...
Rename `static_mut_ref` lint to `static_mut_refs`.
2024-02-18 06:01:40 +03:00
许杰友 Jieyou Xu (Joe)
ec2cc761bc
[AUTO-GENERATED] Migrate ui tests from //
to //@
directives
2024-02-16 20:02:50 +00:00
Ralf Jung
6fe4d66e64
allow static_mut_ref in some tests that specifically test mutable statics
2024-02-12 23:07:07 +01:00
Ralf Jung
d5de9a6105
check_consts: fix some duplicate errors by not calling check_static unnecessarily
2024-02-11 15:12:10 +01:00
Ralf Jung
04bc624ea0
rebless after rebase
2024-02-10 16:13:48 +01:00
Ralf Jung
4e77e368eb
unstably allow constants to refer to statics and read from immutable statics
2024-02-10 16:12:55 +01:00
George-lewis
d56cdd48cb
Bless tests
...
Update tests
2024-01-13 12:46:58 -05:00
Obei Sideg
a8aa6878f6
Update test for E0796
and static_mut_ref
lint
2024-01-07 17:29:25 +03:00
Matthew Jasper
26f48b4cba
Stabilize THIR unsafeck
2024-01-05 10:00:59 +00:00
Matthew Jasper
982b49494e
Remove revisions for THIR unsafeck
...
This is to make the diff when stabilizing it easier to review.
2024-01-05 09:30:27 +00:00
Nilstrieb
41e8d152dc
Show number in error message even for one error
...
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
2023-11-24 19:15:52 +01:00
Matthew Jasper
931692fa13
Recognise thread local statics in THIR unsafeck
2023-11-06 16:23:08 +00:00
whtahy
a87359d7c9
add known-bug test for unsound issue 49682
2023-04-26 22:34:30 -04:00
jyn
01b75e20f2
Move some UI tests into subdirectories
...
to avoid going over the existing limit now that the ui-fulldeps tests have
been moved to ui.
2023-04-02 19:42:30 -04:00
John Kåre Alsaker
d499bbb99d
Use #[cfg(target_thread_local)] on items
2023-03-29 14:50:10 +02:00
John Kåre Alsaker
51c93553d4
Test that TLS access works outside of the dylib it's defined in
2023-03-29 05:56:11 +02:00
Florian Bartels
3ce2cd059f
Add QNX Neutrino support to libstd
...
Co-authored-by: gh-tr <troach@qnx.com>
2023-02-28 15:59:47 +01:00
Albert Larsan
cf2dff2b1e
Move /src/test to /tests
2023-01-11 09:32:08 +00:00