-
Notifications
You must be signed in to change notification settings - Fork 13.4k
[RFC 2011] Library code #97233
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[RFC 2011] Library code #97233
Conversation
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #94119) made this pull request unmergeable. Please resolve the merge conflicts. |
Thanks for splitting this out! Looks reasonable to me, and since it's internal we can always tweak it later. @bors r+ |
📌 Commit 664e8a9 has been approved by |
Thank you @scottmcm ! |
Rollup of 5 pull requests Successful merges: - rust-lang#95953 (Modify MIR building to drop repeat expressions with length zero) - rust-lang#96913 (RFC3239: Implement `cfg(target)` - Part 2) - rust-lang#97233 ([RFC 2011] Library code) - rust-lang#97370 (Minor improvement on else-no-if diagnostic) - rust-lang#97384 (Fix metadata stats.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
[RFC 2011] Basic compiler infrastructure Splitting rust-lang#96496 into smaller pieces as was done in rust-lang#97233. Hope review will be easier. This PR practically contains no logic and only serves as a building ground for the actual code that will be placed in a posterior step. * Adds `context.rs` to place the new `assert!` logic. Has a lot of unused elements but all of them are used by the implementation. * Creates an unstable flag because the feature is not yet complete and also to allow external feedback. * Creates the necessary `sym` identifiers that are mostly based on the library elements -> https://github.com/rust-lang/rust/blob/master/library/core/src/asserting.rs * Modifies `assert.rs` to branch to `context.rs` if the unstable flag is enabled. * Adds a test to satisfy tidy but the test does nothing in reality.
CC #96496
Based on https://github.com/dtolnay/case-studies/tree/master/autoref-specialization.
Basically creates two traits with the same method name. One trait is generic over any
T
and the other is specialized to anyT: Printable
.The compiler will then call the corresponding trait method through auto reference.
r? @scottmcm