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

ices/80772.rs: fixed with no errors #990

Merged
merged 1 commit into from
Oct 15, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#80772

trait SomeTrait {}

struct Exhibit {
    constant: usize,
    factory: fn(&usize) -> Box<dyn SomeTrait>,
}

const A_CONSTANT: &[Exhibit] = &[
    Exhibit {
        constant: 1,
        factory: |_| unimplemented!(),
    },
    Exhibit {
        constant: "Hello world".len(),
        factory: |_| unimplemented!(),
    },
];

fn main() {}
=== stdout ===
=== stderr ===
warning: struct is never constructed: `Exhibit`
 --> /home/runner/work/glacier/glacier/ices/80772.rs:3:8
  |
3 | struct Exhibit {
  |        ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant is never used: `A_CONSTANT`
  --> /home/runner/work/glacier/glacier/ices/80772.rs:8:1
   |
8  | / const A_CONSTANT: &[Exhibit] = &[
9  | |     Exhibit {
10 | |         constant: 1,
11 | |         factory: |_| unimplemented!(),
...  |
16 | |     },
17 | | ];
   | |__^

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: struct is never constructed: `Exhibit`
 --> /home/runner/work/glacier/glacier/ices/80772.rs:3:8
  |
3 | struct Exhibit {
  |        ^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: constant is never used: `A_CONSTANT`
  --> /home/runner/work/glacier/glacier/ices/80772.rs:8:1
   |
8  | / const A_CONSTANT: &[Exhibit] = &[
9  | |     Exhibit {
10 | |         constant: 1,
11 | |         factory: |_| unimplemented!(),
...  |
16 | |     },
17 | | ];
   | |__^

warning: 2 warnings emitted

==============
@JohnTitor JohnTitor merged commit 2b51e3c into master Oct 15, 2021
@JohnTitor JohnTitor deleted the autofix/ices/80772.rs branch October 15, 2021 16:25
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