Skip to content
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

fix library doctest: not failing on some feature gates as expected #114960

Closed
wants to merge 1 commit into from

Conversation

onur-ozkan
Copy link
Member

@onur-ozkan onur-ozkan commented Aug 18, 2023

Updating the behavior of fn is_unstable_reexport to return false for bootstrap environment would result in a breakage of #94972. This was the quickest and simplest solution to fix this elusive bug, which was only identified through miri tests.

Related #114838

@rustbot
Copy link
Collaborator

rustbot commented Aug 18, 2023

r? @petrochenkov

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 18, 2023
Updating the behavior of `fn is_unstable_reexport` to return false for bootstrap environment
would result in a breakage of rust-lang#94972.
This was the quickest and simplest solution to fix this elusive bug, which was only identified
through miri tests.

Signed-off-by: ozkanonur <[email protected]>
@petrochenkov
Copy link
Contributor

Why does is_unstable_reexport return true for imports in #114837?
They don't have any unstable attributes.
The feature gating skip is only supposed to happen for imports with such attributes, like

#[unstable(feature = "something")]
pub use core::something;

This seems to be the root issue.
@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Aug 21, 2023
@onur-ozkan
Copy link
Member Author

Why does is_unstable_reexport return true for imports in #114837? They don't have any unstable attributes. The feature gating skip is only supposed to happen for imports with such attributes, like

#[unstable(feature = "something")]
pub use core::something;

This seems to be the root issue. @rustbot author

The main issue is that this function can't detect unstable attributes which are defined at the top level of the modules when it's the bootstrap environment. This pull request provides a temporary solution until the function is fixed. So, at least bors will avoid merging faulty PRs into the repository.

@petrochenkov
Copy link
Contributor

The main issue is that this function can't detect unstable attributes which are defined at the top level of the modules when it's the bootstrap environment.

If unstable attributes are not detected, then the compiler would report more errors, not less, which is not the case.
I don't want to merge something that hides the root issue.

@onur-ozkan onur-ozkan closed this Aug 22, 2023
@onur-ozkan onur-ozkan deleted the bootstrap-hotfix branch January 27, 2024 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants