Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRemove sync::Once::call_once 'static bound #52239
Conversation
rust-highfive
assigned
bluss
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
r? @bluss (rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
Note also that
|
This comment has been minimized.
This comment has been minimized.
|
The only reason I can see that this would be problematic is if it causes inference issues. I don't know how this might cause inference breakage, but I've long since given up trying to predict what changes to signatures can cause inference breakage at this point. |
kornelski
referenced this pull request
Jul 11, 2018
Merged
Limit wall clock time spent on optimization trials #115
Centril
requested a review
from
alexcrichton
Jul 11, 2018
Centril
added
the
T-libs
label
Jul 11, 2018
kennytm
added
the
relnotes
label
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
Thanks for the PR @CAD97! I think this should be a safe change to apply backwards-compatibly and thanks for doing the digging here to see where the @rfcbot fcp merge |
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jul 11, 2018
•
|
Team member @alexcrichton has proposed to merge this. The next step is review by the rest of the tagged teams: No concerns currently listed. Once a majority of reviewers approve (and none object), this will enter its final comment period. If you spot a major issue that hasn't been raised at any point in this process, please speak up! See this document for info about what commands tagged team members can give me. |
rfcbot
added
proposed-final-comment-period
disposition-merge
labels
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
rfcbot
commented
Jul 11, 2018
|
|
rfcbot
added
final-comment-period
and removed
proposed-final-comment-period
labels
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors: r+ Alrighty! |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-review
labels
Jul 11, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors rollup |
CAD97 commentedJul 11, 2018
•
edited
See https://internals.rust-lang.org/t/sync-once-per-instance/7918 for more context.
Suggested r is @alexcrichton, the one who added the
'staticbound back in 2014. I don't want to officially r? though, if the system would even let me. I'd rather let the system choose the appropriate member since it knows more than I do.git blamehistory forsync::Once::call_once's signature:std: Second pass stabilization of sync (Dec 2014)
libstd: use unboxed closures (Dec 2014)
std: Rewrite the
syncmodule (Nov 2014)The author of this diff is @alexcrichton.
sync::Oncenow contains only a pointer to (privately hidden)Waiters, which are all stack-allocated. The'staticbound tosync::Onceis thus unnecessary to guarantee that any OS primitives are non-relocatable.As the
'staticbound is not required forsync::Once's operation, removing it is strictly more useful. As an example, it allows attaching a one-time operation to instances rather than only to global singletons.