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

E0379 needs to be updated to new format #35338

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

E0379 needs to be updated to new format #35338

sophiajt opened this issue Aug 4, 2016 · 0 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.

Comments

@sophiajt
Copy link
Contributor

sophiajt commented Aug 4, 2016

From: src/test/compile-fail/const-fn-mismatch.rs

Error E0379 needs to a span_label, updating it from:

error[E0379]: trait fns cannot be declared const
  --> src/test/compile-fail/const-fn-mismatch.rs:23:5
   |
23 |     const fn f() -> u32 { 22 } //~ ERROR E0379
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

to:

error[E0379]: trait fns cannot be declared const
  --> src/test/compile-fail/const-fn-mismatch.rs:23:5
   |
23 |     const fn f() -> u32 { 22 } //~ ERROR E0379
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ trait tns cannot be const

Bonus: shrink the span to focus on the const part:

error[E0379]: trait fns cannot be declared const
  --> src/test/compile-fail/const-fn-mismatch.rs:23:5
   |
23 |     const fn f() -> u32 { 22 } //~ ERROR E0379
   |     ^^^^^ trait tns cannot be const
@sophiajt sophiajt added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-diagnostics Area: Messages for errors, warnings, and lints E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. labels Aug 4, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 5, 2016
Update E0379 to new format rust-lang#35338

Fixes rust-lang#35338, as part of rust-lang#35233.

But this does not include the bonus. From my understanding a Span is defined by a `hi` and a `lo` position within some context. A naive way would be to mutate the span so that `hi` is 5 positions from `lo` which corresponds to the `const` keyword. But this methods feels a bit rigid. Is there another way to do this?

r? @jonathandturner
eddyb added a commit to eddyb/rust that referenced this issue Aug 6, 2016
Update E0379 to new format rust-lang#35338

Fixes rust-lang#35338, as part of rust-lang#35233.

But this does not include the bonus. From my understanding a Span is defined by a `hi` and a `lo` position within some context. A naive way would be to mutate the span so that `hi` is 5 positions from `lo` which corresponds to the `const` keyword. But this methods feels a bit rigid. Is there another way to do this?

r? @jonathandturner
jseyfried added a commit to jseyfried/rust that referenced this issue Aug 28, 2016
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 E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.
Projects
None yet
Development

No branches or pull requests

1 participant