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

Add config to unconditionally prefer core imports over std #13212

Merged
merged 1 commit into from
Sep 12, 2022

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Sep 9, 2022

Fixes #12979

@Veykril Veykril marked this pull request as ready for review September 10, 2022 12:53
@Veykril
Copy link
Member Author

Veykril commented Sep 12, 2022

@bors r+

@bors
Copy link
Contributor

bors commented Sep 12, 2022

📌 Commit 7d19971 has been approved by Veykril

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 12, 2022

⌛ Testing commit 7d19971 with merge 352a5b8...

@bors
Copy link
Contributor

bors commented Sep 12, 2022

☀️ Test successful - checks-actions
Approved by: Veykril
Pushing 352a5b8 to master...

@bors bors merged commit 352a5b8 into rust-lang:master Sep 12, 2022
@Veykril Veykril deleted the no-std-config branch September 12, 2022 12:07
bors added a commit that referenced this pull request Sep 13, 2022
When prefer-core is set, invert find path std crate preference

Follow up to #13212, `prefer-core` usually implies that one wants to have the std imports from the defining crate over the re-export.
bors added a commit that referenced this pull request Sep 13, 2022
Restructure `find_path` into a separate functions for modules and non-module items

Follow up to #13212
Also renames `prefer_core` imports config to `prefer_no_std` and changes the behavior of no_std path searching by preferring `core` paths `over` alloc

This PR turned into a slight rewrite, so it unfortunately does a few more things that I initially planned to (including a bug fix for enum variant paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Request: always import from core when possible
2 participants