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

Catch up with format_args change #3674

Merged
merged 1 commit into from
Jan 19, 2019
Merged

Catch up with format_args change #3674

merged 1 commit into from
Jan 19, 2019

Conversation

sinkuu
Copy link
Contributor

@sinkuu sinkuu commented Jan 19, 2019

Catches up with a change in rust-lang/rust#57537. (Since the optimization is optional, this clippy PR can be merged before the rustc PR.)

Happened to fix a bug in expect_fun_call, that is the lint ignores more than
one arguments to format.

warning: use of `expect` followed by a function call
 --> src/main.rs:2:17
  |
2 |     Some("foo").expect(format!("{} {}", 1, 2).as_ref());
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{} {}", 1))`
  |

Catches up with a change in rust-lang/rust#57537

Happened to fix a bug in `expect_fun_call`, that is the lint ignores more than
one arguments to `format`.
@oli-obk
Copy link
Contributor

oli-obk commented Jan 19, 2019

@bors r+

Totally forgot about this, good catch

@bors
Copy link
Collaborator

bors commented Jan 19, 2019

📌 Commit 2ee713d has been approved by oli-obk

@bors
Copy link
Collaborator

bors commented Jan 19, 2019

⌛ Testing commit 2ee713d with merge e648adf...

bors added a commit that referenced this pull request Jan 19, 2019
Catch up with `format_args` change

Catches up with a change in rust-lang/rust#57537. (Since the optimization is optional, this clippy PR can be merged before the rustc PR.)

Happened to fix a bug in `expect_fun_call`, that is the lint ignores more than
one arguments to `format`.

```
warning: use of `expect` followed by a function call
 --> src/main.rs:2:17
  |
2 |     Some("foo").expect(format!("{} {}", 1, 2).as_ref());
  |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try this: `unwrap_or_else(|| panic!("{} {}", 1))`
  |
```
@bors
Copy link
Collaborator

bors commented Jan 19, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: oli-obk
Pushing e648adf to master...

@bors bors merged commit 2ee713d into rust-lang:master Jan 19, 2019
@sinkuu sinkuu deleted the fmt_rustup branch January 19, 2019 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants