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

E0493 needs to be updated to new format #35999

Closed
sophiajt opened this issue Aug 25, 2016 · 0 comments
Closed

E0493 needs to be updated to new format #35999

sophiajt opened this issue Aug 25, 2016 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@sophiajt
Copy link
Contributor

From: src/test/compile-fail/E0493.rs

E0493 needs a span_label, updating it from:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^

To:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^ constants cannot have destructors

Bonus: show a label where the destructor is defined:

error[E0493]: constants are not allowed to have destructors
  --> src/test/compile-fail/E0493.rs:19:17
   |
16 |     fn drop(&mut self) {}
   |     --------------------- destructor defined here
...
19 | const F : Foo = Foo { a : 0 }; //~ ERROR E0493
   |                 ^^^^^^^^^^^^^ constants cannot have destructors
@brson brson added C-enhancement Category: An issue proposing an enhancement or a PR with one. A-diagnostics Area: Messages for errors, warnings, and lints T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-help-wanted Call for participation: Help is requested to fix this issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. and removed E-help-wanted Call for participation: Help is requested to fix this issue. labels Aug 26, 2016
Manishearth added a commit to Manishearth/rust that referenced this issue Sep 4, 2016
…t, r=jonathandturner

Updated e0493 to new format (+ bonus).

Part of rust-lang#35233.
Fixes rust-lang#35999.

r? @jonathandturner

I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
Manishearth added a commit to Manishearth/rust that referenced this issue Sep 4, 2016
…t, r=jonathandturner

Updated e0493 to new format (+ bonus).

Part of rust-lang#35233.
Fixes rust-lang#35999.

r? @jonathandturner

I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints C-enhancement Category: An issue proposing an enhancement or a PR with one. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

2 participants