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

E0214 needs to be updated to new format #35383

Closed
sophiajt opened this issue Aug 5, 2016 · 2 comments
Closed

E0214 needs to be updated to new format #35383

sophiajt opened this issue Aug 5, 2016 · 2 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 5, 2016

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

Error E0214 needs a span_label, updating it from:

error[E0214]: parenthesized parameters may only be used with a trait
  --> src/test/compile-fail/E0214.rs:12:12
   |
12 |     let v: Vec(&str) = vec!["foo"]; //~ ERROR E0214
   |            ^^^^^^^^^

To:

error[E0214]: parenthesized parameters may only be used with a trait
  --> src/test/compile-fail/E0214.rs:12:12
   |
12 |     let v: Vec(&str) = vec!["foo"]; //~ ERROR E0214
   |            ^^^^^^^^^ only traits may use parentheses

Bonus: shrink the span to only the parenthesized expression:

error[E0214]: parenthesized parameters may only be used with a trait
  --> src/test/compile-fail/E0214.rs:12:12
   |
12 |     let v: Vec(&str) = vec!["foo"]; //~ ERROR E0214
   |               ^^^^^^ only traits may use parentheses
@sophiajt sophiajt added 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. labels Aug 5, 2016
@munyari
Copy link
Contributor

munyari commented Aug 5, 2016

taking this

sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 7, 2016
sophiajt pushed a commit to sophiajt/rust that referenced this issue Aug 8, 2016
steveklabnik added a commit to steveklabnik/rust that referenced this issue Aug 10, 2016
@donaldpipowitch
Copy link

@jonathandturner Do you think it makes sense to add a help hint to this error message similar to other error messages? Could be helpful for beginners.

error[E0214]: parenthesized parameters may only be used with a trait
  --> src/main.rs:13:23
   |
13 |     prev_value: Option(String),
   |                       ^^^^^^^^ only traits may use parentheses
   |                        - help: did you mean to use `Option<String>` here instead?

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

3 participants