Skip to content
This repository was archived by the owner on Nov 24, 2023. It is now read-only.

Custom warning when rustfix replacing fails #94

Merged

Conversation

killercup
Copy link
Member

When rustfix fails to replace a chunk of code, we now display a
similar warning than when we "fixed" the code so that it no longer
compiles.

Previously, when rustfix fails to apply suggestions to a file, we bailed
out of the whole loop over all the files in the current target. Instead,
we'll now log a nice error message. (I'm not sure if that is a good idea
but we will revert non-compiling changes later on anyway.)

killercup added 2 commits May 6, 2018 19:11
When rustfix fails to replace a chunk of code, we now display a
similar warning than when we "fixed" the code so that it no longer
compiles.

Previously, when rustfix fails to apply suggestions to a file, we bailed
out of the whole loop over all the files in the current target. Instead,
we'll now log a nice error message. (I'm not sure if that is a good idea
but we will revert non-compiling changes later on anyway.)
@killercup killercup requested a review from alexcrichton May 6, 2018 17:34
//! Ensure we give good error message when rustfix failes to apply changes
//!
//! TODO: Add rustc shim that outputs wrong suggestions instead of depending on
//! actual rustc bugs!
Copy link
Member Author

Choose a reason for hiding this comment

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

rust-lang/rust#50472 will break the test in this file :)

@alexcrichton alexcrichton merged commit a646d16 into rust-lang:master May 6, 2018
@alexcrichton
Copy link
Member

Looks great! We'll figure out to do once the upstream bug is fixed :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants