Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

ices/83176.rs: fixed with no errors #700

Merged
merged 1 commit into from
Mar 25, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#83176

#![warn(disjoint_capture_drop_reorder)]

fn main() {
    if let a = "" {
        drop(|_: ()| drop(a));
    }
}
=== stdout ===
=== stderr ===
warning: irrefutable `if let` pattern
 --> /home/runner/work/glacier/glacier/ices/83176.rs:4:5
  |
4 | /     if let a = "" {
5 | |         drop(|_: ()| drop(a));
6 | |     }
  | |_____^
  |
  = note: `#[warn(irrefutable_let_patterns)]` on by default
  = note: this pattern will always match, so the `if let` is useless
  = help: consider replacing the `if let` with a `let`

warning: 1 warning emitted

==============

=== stdout ===
=== stderr ===
warning: irrefutable `if let` pattern
 --> /home/runner/work/glacier/glacier/ices/83176.rs:4:5
  |
4 | /     if let a = "" {
5 | |         drop(|_: ()| drop(a));
6 | |     }
  | |_____^
  |
  = note: `#[warn(irrefutable_let_patterns)]` on by default
  = note: this pattern will always match, so the `if let` is useless
  = help: consider replacing the `if let` with a `let`

warning: 1 warning emitted

==============
@JohnTitor JohnTitor merged commit a153579 into master Mar 25, 2021
@JohnTitor JohnTitor deleted the autofix/ices/83176.rs branch March 25, 2021 12:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants