Skip to content
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

improve reporting for future-incompatible lints #30746

Closed
nikomatsakis opened this Issue Jan 6, 2016 · 0 comments

Comments

Projects
None yet
1 participant
@nikomatsakis
Copy link
Contributor

nikomatsakis commented Jan 6, 2016

PR #30724 adds a note to "future-incompatible" lints indicating that they will be a hard error in the future, but it would be better to also specify why the change is being made. For example, "this is due to a bug fix, please see issue #123 for details"

cc @brson

@nikomatsakis nikomatsakis self-assigned this Jan 6, 2016

Manishearth added a commit to Manishearth/rust that referenced this issue Jan 15, 2016

Rollup merge of rust-lang#30787 - nikomatsakis:future-incompatible-li…
…nt, r=brson

There is now more structure to the report, so that you can specify e.g. an RFC/PR/issue number and other explanatory details.

Example message:

```
type-parameter-invalid-lint.rs:14:8: 14:9 error: defaults for type parameters are only allowed on type definitions, like `struct` or `enum`
type-parameter-invalid-lint.rs:14 fn avg<T=i32>(_: T) {}
                                         ^
type-parameter-invalid-lint.rs:14:8: 14:9 warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
type-parameter-invalid-lint.rs:14:8: 14:9 note: for more information, see PR 30742 <rust-lang#30724>
type-parameter-invalid-lint.rs:11:9: 11:28 note: lint level defined here
type-parameter-invalid-lint.rs:11 #![deny(future_incompatible)]
                                          ^~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
```

r? @brson

I would really like feedback also on the specific messages!

Fixes rust-lang#30746

@bors bors closed this in #30787 Jan 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.