-
Notifications
You must be signed in to change notification settings - Fork 13k
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 error in Rust 2018 + no_core environment #59462
Conversation
@petrochenkov Is this possibly due to hard-coding paths in HIR lowering? (can we stop doing that and instead introduce |
@Centril You'd need to move lang item collection to before HIR lowering. Doable, but AFAIK it currently is still happening after HIR lowering. |
@eddyb What are the primary reasons why we haven't done so hitherto? perf? "no one has put in the work"? something else? Otherwise... It seems like something we should do then? |
Yes. I think @durka poked at this a year or two ago, but, yeah, I agree we should try again. |
Should built-in macros also search traits like |
Proc macros face a very similar problem when they need to find items from a certain crate, and we also have Same approach can be used here, I believe - |
The issue with this lowering-time desugaring is that the paths it generates not only need to be resolved, but they also should be "presentable" and look differently depending on
In this sense what this PR does is the correct solution. |
Nah, this is good as is. @bors r+ |
📌 Commit 8033aefeef4c8f1625c26c1888d67d5498a79548 has been approved by |
@bors r- (see #59462 (comment)) |
@bors r+ (#59462 (comment) is addressed) |
📌 Commit 362d243 has been approved by |
Fix error in Rust 2018 + no_core environment Minimized reproduction: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=5b9f6c3026ec9d856699fa6dbd4361f0 This is a fix for the error that occurred in rust-lang#58702. r? @Centril
Rollup of 9 pull requests Successful merges: - #59366 (Update books) - #59436 (Update jemalloc-sys to version 0.3.0) - #59454 (Update rustfmt to 1.2.0) - #59462 (Fix error in Rust 2018 + no_core environment) - #59467 (Better diagnostic for binary operation on BoxedValues) - #59473 (Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans) - #59480 (Update stdsimd) - #59486 (Visit `ImplItem` in `dead_code` lint) - #59510 (Rename `type_parameters` to `generics` and so on) Failed merges: - #59516 (Update cargo) r? @ghost
Rollup of 9 pull requests Successful merges: - #59366 (Update books) - #59436 (Update jemalloc-sys to version 0.3.0) - #59454 (Update rustfmt to 1.2.0) - #59462 (Fix error in Rust 2018 + no_core environment) - #59467 (Better diagnostic for binary operation on BoxedValues) - #59473 (Do not emit incorrect borrow suggestion involving macros and fix overlapping multiline spans) - #59480 (Update stdsimd) - #59486 (Visit `ImplItem` in `dead_code` lint) - #59510 (Rename `type_parameters` to `generics` and so on) Failed merges: - #59516 (Update cargo) r? @ghost
Beta nominating for bootstrap compiler due to #58702 (comment). |
discussed at T-compiler meeting. Declining to beta-backport: The only client a backport would benefit would be |
Minimized reproduction: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=5b9f6c3026ec9d856699fa6dbd4361f0
This is a fix for the error that occurred in #58702.
r? @Centril