-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Experiment: Apply #[deprecated_safe]
to env::set_var
/env::remove_var
#95942
Conversation
… unsafety checkers)
Some changes occured to rustc_codegen_cranelift cc @bjorn3 Some changes occured to the CTFE / Miri engine cc @rust-lang/miri Some changes occurred in src/tools/clippy. cc @rust-lang/clippy |
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
will be away next week, so if it gets ready for review by that time, feel free to reassign this, will needs |
☔ The latest upstream changes (presumably #96087) made this pull request unmergeable. Please resolve the merge conflicts. |
@@ -1320,7 +1324,11 @@ pub fn main() -> ! { | |||
init_rustc_env_logger(); | |||
signal_handler::install(); | |||
let mut callbacks = TimePassesCallbacks::default(); | |||
install_ice_hook(); | |||
// SAFETY: in main(), no other threads could be reading or writing the environment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// SAFETY: Lack of thread conflicts asserted by the caller
@@ -13,7 +13,11 @@ fn test_get_dbpath_for_term() { | |||
} | |||
assert!(x("screen") == "/usr/share/terminfo/s/screen"); | |||
assert!(get_dbpath_for_term("") == None); | |||
// FIXME(skippy) there's no fix for deprecated_safe until tests can be run single threaded | |||
#[cfg_attr(not(bootstrap), allow(deprecated_safe))] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This style of cfg_attr
s is suspicious - aren't the bootstrap cfgs going to be deleted at the next upgrade?
Instead, use // SAFETY: FIXME(skippy) This code is incorrect.
Aside: |
cc #94978
cc #95025
cc #94619