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

ices/72565.rs: fixed with errors #474

Merged
merged 1 commit into from
Sep 27, 2020
Merged

ices/72565.rs: fixed with errors #474

merged 1 commit into from
Sep 27, 2020

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#72565

const F: &'static dyn PartialEq<u32> = &7u32;

fn main() {
    let a: &dyn PartialEq<u32> = &7u32;
    match a {
        F => panic!(),
        _ => {}
    }
}
=== stdout ===
=== stderr ===
error: `&dyn PartialEq<u32>` cannot be used in patterns
 --> /home/runner/work/glacier/glacier/ices/72565.rs:6:9
  |
6 |         F => panic!(),
  |         ^

warning: unreachable pattern
 --> /home/runner/work/glacier/glacier/ices/72565.rs:7:9
  |
7 |         _ => {}
  |         ^
  |
  = note: `#[warn(unreachable_patterns)]` on by default

error: aborting due to previous error; 1 warning emitted

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

=== stdout ===
=== stderr ===
error: `&dyn PartialEq<u32>` cannot be used in patterns
 --> /home/runner/work/glacier/glacier/ices/72565.rs:6:9
  |
6 |         F => panic!(),
  |         ^

warning: unreachable pattern
 --> /home/runner/work/glacier/glacier/ices/72565.rs:7:9
  |
7 |         _ => {}
  |         ^
  |
  = note: `#[warn(unreachable_patterns)]` on by default

error: aborting due to previous error; 1 warning emitted

==============
@Alexendoo Alexendoo merged commit 094419b into master Sep 27, 2020
@Alexendoo Alexendoo deleted the autofix/ices/72565.rs branch September 27, 2020 17:27
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