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

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

Closed
likewhatevs opened this issue Dec 11, 2018 · 1 comment
Closed

Comments

@likewhatevs
Copy link

likewhatevs commented Dec 11, 2018

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.

@alexcrichton
Copy link
Member

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

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

No branches or pull requests

2 participants