-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add support for making lib features internal #118123
Conversation
r? @wesleywiser (rustbot has picked a reviewer for you, use r? to override) |
@Amanieu it looks like stdarch is using the core_intrinsics feature, so the build will fail here. What is the best way to change this feature name? (Submodules are so painful. I hope we can transition everything to subtrees eventually...) |
This comment has been minimized.
This comment has been minimized.
@@ -207,9 +216,6 @@ declare_features! ( | |||
(internal, test_2018_feature, "1.31.0", None, Some(Edition::Edition2018)), | |||
/// Added for testing unstable lints; perma-unstable. | |||
(internal, test_unstable_lint, "1.60.0", None, None), | |||
/// Allows non-`unsafe` —and thus, unsound— access to `Pin` constructions. | |||
/// Marked `internal` since perma-unstable and unsound. | |||
(internal, unsafe_pin_internals, "1.60.0", None, None), |
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 is a libs feature that was added here solely to make it "incomplete" (c93968a), and then later "internal". That's not needed any more.
Turns out it's not very hard to avoid using this feature in stdarch, so rust-lang/stdarch#1500 should let us do this transition. |
Oh, turns out the build failure here is from compiler-builtins, not stdarch. stdarch is fine since it is not a separate crate. EDIT: PR filed: rust-lang/compiler-builtins#557 |
b9cdbc6
to
9e52bec
Compare
As suggested by @Nilstrieb, instead of trying to rename |
This comment has been minimized.
This comment has been minimized.
9e52bec
to
eeabb78
Compare
This comment has been minimized.
This comment has been minimized.
eeabb78
to
5b4cd1b
Compare
This comment has been minimized.
This comment has been minimized.
5b4cd1b
to
d705627
Compare
This comment has been minimized.
This comment has been minimized.
d705627
to
74834a9
Compare
Some changes occurred in src/tools/rust-analyzer cc @rust-lang/rust-analyzer |
|
2 weeks without hearing from the reviewer, let me re-roll the dice. |
…compiler-errors Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to rust-lang#115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes rust-lang#115597.
…compiler-errors Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to rust-lang#115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes rust-lang#115597.
…compiler-errors Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to rust-lang#115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes rust-lang#115597.
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#117793 (Update variable name to fix `unused_variables` warning) - rust-lang#118123 (Add support for making lib features internal) - rust-lang#118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) - rust-lang#118346 (Add `deeply_normalize_for_diagnostics`, use it in coherence) - rust-lang#118350 (Simplify Default for tuples) - rust-lang#118450 (Use OnceCell in cell module documentation) - rust-lang#118585 (Fix parser ICE when recovering `dyn`/`impl` after `for<...>`) - rust-lang#118587 (Cleanup error handlers some more) - rust-lang#118642 (bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros`) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#117793 (Update variable name to fix `unused_variables` warning) - rust-lang#118123 (Add support for making lib features internal) - rust-lang#118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) - rust-lang#118346 (Add `deeply_normalize_for_diagnostics`, use it in coherence) - rust-lang#118350 (Simplify Default for tuples) - rust-lang#118450 (Use OnceCell in cell module documentation) - rust-lang#118585 (Fix parser ICE when recovering `dyn`/`impl` after `for<...>`) - rust-lang#118587 (Cleanup error handlers some more) - rust-lang#118642 (bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros`) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#117793 (Update variable name to fix `unused_variables` warning) - rust-lang#118123 (Add support for making lib features internal) - rust-lang#118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) - rust-lang#118346 (Add `deeply_normalize_for_diagnostics`, use it in coherence) - rust-lang#118350 (Simplify Default for tuples) - rust-lang#118450 (Use OnceCell in cell module documentation) - rust-lang#118585 (Fix parser ICE when recovering `dyn`/`impl` after `for<...>`) - rust-lang#118587 (Cleanup error handlers some more) - rust-lang#118642 (bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros`) r? `@ghost` `@rustbot` modify labels: rollup
…mpiler-errors Rollup of 9 pull requests Successful merges: - rust-lang#117793 (Update variable name to fix `unused_variables` warning) - rust-lang#118123 (Add support for making lib features internal) - rust-lang#118268 (Pretty print `Fn<(..., ...)>` trait refs with parentheses (almost) always) - rust-lang#118346 (Add `deeply_normalize_for_diagnostics`, use it in coherence) - rust-lang#118350 (Simplify Default for tuples) - rust-lang#118450 (Use OnceCell in cell module documentation) - rust-lang#118585 (Fix parser ICE when recovering `dyn`/`impl` after `for<...>`) - rust-lang#118587 (Cleanup error handlers some more) - rust-lang#118642 (bootstrap(builder.rs): Don't explicitly warn against `semicolon_in_expressions_from_macros`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#118123 - RalfJung:internal-lib-features, r=compiler-errors Add support for making lib features internal We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug. This extends that idea to lib features as well. It is an alternative to rust-lang#115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in `_internals` or `_internal` is considered internal. Then we rename `core_intrinsics` to `core_intrinsics_internal`, which fixes rust-lang#115597.
…8472 merge core_panic feature into panic_internals I don't know why those are two separate features, but it does not seem intentional. This merge is useful because with rust-lang#118123, panic_internals is recognized as an internal feature, but core_panic is not -- but core_panic definitely should be internal.
Rollup merge of rust-lang#118781 - RalfJung:core-panic-feature, r=the8472 merge core_panic feature into panic_internals I don't know why those are two separate features, but it does not seem intentional. This merge is useful because with rust-lang#118123, panic_internals is recognized as an internal feature, but core_panic is not -- but core_panic definitely should be internal.
We have the notion of an "internal" lang feature: a feature that is never intended to be stabilized, and using which can cause ICEs and other issues without that being considered a bug.
This extends that idea to lib features as well. It is an alternative to #115623: instead of using an attribute to declare lib features internal, we simply do this based on the name. Everything ending in
_internals
or_internal
is considered internal.Then we rename
core_intrinsics
tocore_intrinsics_internal
, which fixes #115597.