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

Lower-case diagnostics in libsyntax and librustc #12050

Closed
brson opened this issue Feb 5, 2014 · 2 comments · Fixed by #12065
Closed

Lower-case diagnostics in libsyntax and librustc #12050

brson opened this issue Feb 5, 2014 · 2 comments · Fixed by #12065
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@brson
Copy link
Contributor

brson commented Feb 5, 2014

Our convention for error messages is that the first letter should be lowercase; subsequent sentences in error massages begin with uppercase. Our diagnostics are not consistent in this though and there are a number that begin with capital letters. Find them and destroy them.

@mrshu
Copy link
Contributor

mrshu commented Feb 6, 2014

I would like to take this one.

I am wondering if you would like to apply the same to llvm_err like here: https://github.com/mozilla/rust/blob/master/src/librustc/back/link.rs#L80 ?

@brson
Copy link
Contributor Author

brson commented Feb 6, 2014

@mrshu Yes, llvm_err as well. Thanks!

@bors bors closed this as completed in cba7ac5 Feb 8, 2014
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 11, 2024
When `identity_op` identifies a `no_op`, provides a suggestion, it also
checks the type of the type of the variable. If the variable is
a reference that's been coerced into a value, e.g.

```
let x = &0i32;
let _ = x + 0;
```

the suggestion will now use a derefence. This is done by identifying
whether the variable is a reference to an integral value, and then
whether it gets dereferenced.

changelog: false positive: [`identity_op`]: corrected suggestion for
reference coerced to value.

fixes: rust-lang#12050
flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 11, 2024
Fixes: rust-lang#12050 - `identity_op` correctly suggests a deference for coerced references

When `identity_op` identifies a `no_op`, provides a suggestion, it also checks the type of the type of the variable. If the variable is a reference that's been coerced into a value, e.g.

```
let x = &0i32;
let _ = x + 0;
```

the suggestion will now use a derefence. This is done by identifying whether the variable is a reference to an integral value, and then whether it gets dereferenced.

changelog: false positive: [`identity_op`]: corrected suggestion for reference coerced to value.

fixes: rust-lang#12050
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants