Skip to content

Delay error reporting of filename mismatch. #37987

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

Merged
merged 1 commit into from
Nov 25, 2016

Conversation

plietar
Copy link
Contributor

@plietar plietar commented Nov 24, 2016

When cross compiling with procedural macros, the crate loader starts by
looking for a target crate, before trying with a host crate.

Rather than emitting an error immediately if the host and target
extension differ, the compiler should delay it until both attempts have
failed.

Fixes #37899

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jseyfried (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@plietar
Copy link
Contributor Author

plietar commented Nov 24, 2016

I'm not sure how to test this, I can't find any example of tests which rely on cross compilation.

When cross compiling with procedural macros, the crate loader starts by
looking for a target crate, before trying with a host crate.

Rather than emitting an error immediately if the host and target
extension differ, the compiler should delay it until both attempts have
failed.

Fixes rust-lang#37899

r? @jseyfried
@jseyfried
Copy link
Contributor

@plietar Excellent, thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Nov 25, 2016

📌 Commit 2cdde5a has been approved by jseyfried

@jseyfried
Copy link
Contributor

I opened issue #37993 for tests.

@bors
Copy link
Collaborator

bors commented Nov 25, 2016

⌛ Testing commit 2cdde5a with merge dad5cde...

bors added a commit that referenced this pull request Nov 25, 2016
Delay error reporting of filename mismatch.

When cross compiling with procedural macros, the crate loader starts by
looking for a target crate, before trying with a host crate.

Rather than emitting an error immediately if the host and target
extension differ, the compiler should delay it until both attempts have
failed.

Fixes #37899
@bors bors merged commit 2cdde5a into rust-lang:master Nov 25, 2016
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.

4 participants