format_foreign.rs: unwrap return Option value for fn position, as it always returns Some#118409
Merged
bors merged 1 commit intorust-lang:masterfrom Nov 29, 2023
Merged
format_foreign.rs: unwrap return Option value for fn position, as it always returns Some#118409bors merged 1 commit intorust-lang:masterfrom
fn position, as it always returns Some#118409bors merged 1 commit intorust-lang:masterfrom
Conversation
Collaborator
|
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
klensy
commented
Nov 28, 2023
Comment on lines
686
to
699
| } else { | ||
| if success { | ||
| diag.help(format!("`{}` should be written as `{}`", sub, trn)); | ||
| } else { | ||
| diag.note(format!("`{}` should use curly braces, and {}", sub, trn)); | ||
| } | ||
| diag.span_note( | ||
| sp, | ||
| format!("format specifiers use curly braces, and {}", trn), | ||
| ); | ||
| } |
Contributor
There was a problem hiding this comment.
Yeah, looks to be. I wonder if it was ever tested?
Contributor
|
r? compiler-errors @bors r+ |
Collaborator
Contributor
|
@bors rollup |
bors
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#118342 (Dont suggest `!` for path in function call if it has generic args) - rust-lang#118383 (Address unused tuple struct fields in the standard library) - rust-lang#118401 (`rustc_ast_lowering` cleanups) - rust-lang#118409 (format_foreign.rs: unwrap return Option value for `fn position`, as it always returns Some) - rust-lang#118413 (Fix the issue of suggesting unwrap/expect for shorthand field) - rust-lang#118425 (Update cargo) - rust-lang#118429 (Fix a typo in a `format_args!` note) r? `@ghost` `@rustbot` modify labels: rollup
rust-timer
added a commit
to rust-lang-ci/rust
that referenced
this pull request
Nov 29, 2023
Rollup merge of rust-lang#118409 - klensy:position-opt, r=compiler-errors format_foreign.rs: unwrap return Option value for `fn position`, as it always returns Some Trivial cleanup. It will be nice to have way to run exhaustiveness analysis on similar cases to see dead code.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trivial cleanup.
It will be nice to have way to run exhaustiveness analysis on similar cases to see dead code.