Skip to content

fix: Reimplement crate_supports_no_std syntactic heuristic#22747

Open
Veykril wants to merge 1 commit into
rust-lang:masterfrom
Veykril:lukaswirth/push-zwpsumlyprzo
Open

fix: Reimplement crate_supports_no_std syntactic heuristic#22747
Veykril wants to merge 1 commit into
rust-lang:masterfrom
Veykril:lukaswirth/push-zwpsumlyprzo

Conversation

@Veykril

@Veykril Veykril commented Jul 9, 2026

Copy link
Copy Markdown
Member

This was never correctly tested which caused us to lose the correct implementation.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 9, 2026
@Veykril Veykril enabled auto-merge July 9, 2026 11:12

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a specific reason for not simply querying the def map? The approach in this PR is faster as it avoids computing the def map, but this doesn't matter where it's used.

View changes since this review

@Veykril

Veykril commented Jul 9, 2026

Copy link
Copy Markdown
Member Author

The def map stores the no_stdness for the current cfg set. This function wants to know whether the crate can be no_std under some arbitrary cfg configuration

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants