rust-lang/rustfix

issue with unused rocket url parameters being renamed in one place only

Closed this issue · 1 comments

Not sure if this is the right place (or if this issue is open using more correct terminology I don't follow), but I received this message:

warning: failed to automatically apply fixes suggested by rustc to crate `packagename`
after fixes were automatically applied the compiler reported errors within these files:
...
This likely indicates a bug in either rustc or cargo itself,
and we would appreciate a bug report!

The warnings weren't all that clarifying on their own, but by setting --broken-code, I was able to see that the following breaking change:

#[get("/<a>/<b>")]
pub fn endpoint(a: String, b: String) -> Result<AttachmentString, failure::Error> -> {

to

#[get("/<a>/<b>")]
pub fn endpoint(a: String, _b: String) -> Result<AttachmentString, failure::Error> -> {

as to why one would do that, it was a simple way to set filename without having to add a content-disposition header.

Thanks for the report! This is actually due to rust-lang/cargo#5738 during the edition migration (and was also the original impetus for that report!)

I'm gonna close this in favor of that upstream issue