-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Adjust new suggestions to the suggestion guidelines #43386
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,11 @@ error[E0308]: mismatched types | |
| | ||
= note: expected type `()` | ||
found type `usize` | ||
help: did you mean to add a semicolon here? | ||
help: try adding a semicolon | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I feel like a
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Or does that look funny? The double There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (Anyway, that's orthogonal from this PR, I know. cc @estebank ) |
||
| | ||
19 | foo(); | ||
| ^ | ||
help: possibly return type missing here? | ||
help: try adding a return type | ||
| | ||
18 | fn bar() -> usize { | ||
| ^^^^^^^^ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,66 +2,46 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com | |
--> $DIR/issue-22644.rs:16:31 | ||
| | ||
16 | println!("{}", a as usize < long_name); | ||
| ^ --------- interpreted as generic arguments | ||
| | | ||
| not interpreted as comparison | ||
| | ||
help: if you want to compare the casted value then write: | ||
| | ||
16 | println!("{}", (a as usize) < long_name); | ||
| ^^^^^^^^^^^^ | ||
| ---------- ^ --------- interpreted as generic arguments | ||
| | | | ||
| | not interpreted as comparison | ||
| help: try comparing the casted value: `(a as usize)` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh, changing the message string somehow changes formatting? Is it length dependent? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes |
||
|
||
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison | ||
--> $DIR/issue-22644.rs:17:33 | ||
| | ||
17 | println!("{}{}", a as usize < long_name, long_name); | ||
| ^ -------------------- interpreted as generic arguments | ||
| | | ||
| not interpreted as comparison | ||
| | ||
help: if you want to compare the casted value then write: | ||
| | ||
17 | println!("{}{}", (a as usize) < long_name, long_name); | ||
| ^^^^^^^^^^^^ | ||
| ---------- ^ -------------------- interpreted as generic arguments | ||
| | | | ||
| | not interpreted as comparison | ||
| help: try comparing the casted value: `(a as usize)` | ||
|
||
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison | ||
--> $DIR/issue-22644.rs:18:31 | ||
| | ||
18 | println!("{}", a as usize < 4); | ||
| ^ - interpreted as generic arguments | ||
| | | ||
| not interpreted as comparison | ||
| | ||
help: if you want to compare the casted value then write: | ||
| | ||
18 | println!("{}", (a as usize) < 4); | ||
| ^^^^^^^^^^^^ | ||
| ---------- ^ - interpreted as generic arguments | ||
| | | | ||
| | not interpreted as comparison | ||
| help: try comparing the casted value: `(a as usize)` | ||
|
||
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison | ||
--> $DIR/issue-22644.rs:20:31 | ||
| | ||
20 | println!("{}{}", a: usize < long_name, long_name); | ||
| ^ -------------------- interpreted as generic arguments | ||
| | | ||
| not interpreted as comparison | ||
| | ||
help: if you want to compare the casted value then write: | ||
| | ||
20 | println!("{}{}", (a: usize) < long_name, long_name); | ||
| ^^^^^^^^^^ | ||
| -------- ^ -------------------- interpreted as generic arguments | ||
| | | | ||
| | not interpreted as comparison | ||
| help: try comparing the casted value: `(a: usize)` | ||
|
||
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison | ||
--> $DIR/issue-22644.rs:21:29 | ||
| | ||
21 | println!("{}", a: usize < 4); | ||
| ^ - interpreted as generic arguments | ||
| | | ||
| not interpreted as comparison | ||
| | ||
help: if you want to compare the casted value then write: | ||
| | ||
21 | println!("{}", (a: usize) < 4); | ||
| ^^^^^^^^^^ | ||
| -------- ^ - interpreted as generic arguments | ||
| | | | ||
| | not interpreted as comparison | ||
| help: try comparing the casted value: `(a: usize)` | ||
|
||
error: `<` is interpreted as a start of generic arguments for `usize`, not a comparison | ||
--> $DIR/issue-22644.rs:26:20 | ||
|
@@ -71,7 +51,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com | |
27 | 4); | ||
| - interpreted as generic arguments | ||
| | ||
help: if you want to compare the casted value then write: | ||
help: try comparing the casted value | ||
| | ||
23 | println!("{}", (a | ||
24 | as | ||
|
@@ -86,7 +66,7 @@ error: `<` is interpreted as a start of generic arguments for `usize`, not a com | |
36 | 5); | ||
| - interpreted as generic arguments | ||
| | ||
help: if you want to compare the casted value then write: | ||
help: try comparing the casted value | ||
| | ||
28 | println!("{}", (a | ||
29 | | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry 😰
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those guidelines only exist in master since a few days, everything's good!