-
Notifications
You must be signed in to change notification settings - Fork 13.3k
std: Internalize almost all of std::rt
#28306
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
Conversation
r? @brson |
r? @huonw (rust_highfive has picked a reviewer for you, use r? to override) |
@@ -442,19 +440,6 @@ fn init() { | |||
|
|||
assert!(DIRECTIVES.is_null()); | |||
DIRECTIVES = Box::into_raw(box directives); | |||
|
|||
// Schedule the cleanup for the globals for when the runtime exits. |
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.
If this block is to be removed, should we also delete https://github.com/alexcrichton/rust/blob/less-rt/src/liblog/lib.rs#L293 and https://github.com/alexcrichton/rust/blob/less-rt/src/liblog/lib.rs#L386 ?
AFAICT 1
will never be assigned to them in the new code.
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.
Yeah, those pieces can be deleted
295f0e3
to
53f933b
Compare
Is the privatization of The function is also platform-dependent so you can't really work around its absence with copy-paste or creative use of |
r=me assuming @arielb1's q's are satisfied |
53f933b
to
f58cd68
Compare
@arielb1 it is intentional, yes. This module was never intended to be public and it's just a historical relic that it's still exposed, so I wanted to hide it via privacy ASAP. Currently there's no stable method to write your own panic handler, so it's not a critical use case for continued exposure. External crates can use support on crates.io and this can be re-exposed temporarily for internal crates if truly necessary. @bors: r=brson 53f933b661c9206d29a2414d58a2f106aed0db9b |
🙀 |
@bors: r=brson f58cd68a9af504f92f30084a30c31f2f8554b011 |
⌛ Testing commit f58cd68 with merge 4dff74d... |
💔 Test failed - auto-win-msvc-64-opt |
f58cd68
to
c57b604
Compare
@bors: r=brson c57b604856994eb0bbd2bdb02e86618c4392be0d |
⌛ Testing commit c57b604 with merge 1759de6... |
💔 Test failed - auto-win-msvc-64-opt |
c57b604
to
0199132
Compare
@bors: r=brson 01991321f7384fc40928faf0ce69e355a24ec5df |
⌛ Testing commit 0199132 with merge 0e8e8d0... |
💔 Test failed - auto-mac-64-opt |
0199132
to
ffe18b3
Compare
@bors: r+ ffe18b39f332434e01a383921b60cb213b484cb9 |
⌛ Testing commit ffe18b3 with merge 49d0622... |
💔 Test failed - auto-win-msvc-32-opt |
ffe18b3
to
13b228c
Compare
@bors: r=brson 13b228c42a35e992e04d6f47d5c3d15055449606 |
⌛ Testing commit 13b228c with merge a762b4d... |
💔 Test failed - auto-linux-64-x-android-t |
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
13b228c
to
f4be202
Compare
This commit does some refactoring to make almost all of the `std::rt` private. Specifically, the following items are no longer part of its API: * DEFAULT_ERROR_CODE * backtrace * unwind * args * at_exit * cleanup * heap (this is just alloc::heap) * min_stack * util The module is now tagged as `#[doc(hidden)]` as the only purpose it's serve is an entry point for the `panic!` macro via the `begin_unwind` and `begin_unwind_fmt` reexports.
This commit does some refactoring to make almost all of the
std::rt
private.Specifically, the following items are no longer part of its API:
The module is now tagged as
#[doc(hidden)]
as the only purpose it's serve isan entry point for the
panic!
macro via thebegin_unwind
andbegin_unwind_fmt
reexports.