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

ices/68532.rs: fixed with no errors #380

Merged
merged 1 commit into from
May 25, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#68532

struct A<'a>(&'a ());

impl<'a> A<'a> {
    const N: usize = 68;

    fn foo(&self) {
        let mut b = [0; Self::N];
    }
}

fn main() {}
=== stdout ===
=== stderr ===
warning: unused variable: `b`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:7:13
  |
7 |         let mut b = [0; Self::N];
  |             ^^^^^ help: if this is intentional, prefix it with an underscore: `_b`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
 --> /home/runner/work/glacier/glacier/ices/68532.rs:7:13
  |
7 |         let mut b = [0; Self::N];
  |             ----^
  |             |
  |             help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

warning: struct is never constructed: `A`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:1:8
  |
1 | struct A<'a>(&'a ());
  |        ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated constant is never used: `N`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:4:5
  |
4 |     const N: usize = 68;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: associated function is never used: `foo`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:6:8
  |
6 |     fn foo(&self) {
  |        ^^^

warning: 5 warnings emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `b`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:7:13
  |
7 |         let mut b = [0; Self::N];
  |             ^^^^^ help: if this is intentional, prefix it with an underscore: `_b`
  |
  = note: `#[warn(unused_variables)]` on by default

warning: variable does not need to be mutable
 --> /home/runner/work/glacier/glacier/ices/68532.rs:7:13
  |
7 |         let mut b = [0; Self::N];
  |             ----^
  |             |
  |             help: remove this `mut`
  |
  = note: `#[warn(unused_mut)]` on by default

warning: struct is never constructed: `A`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:1:8
  |
1 | struct A<'a>(&'a ());
  |        ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated constant is never used: `N`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:4:5
  |
4 |     const N: usize = 68;
  |     ^^^^^^^^^^^^^^^^^^^^

warning: associated function is never used: `foo`
 --> /home/runner/work/glacier/glacier/ices/68532.rs:6:8
  |
6 |     fn foo(&self) {
  |        ^^^

warning: 5 warnings emitted

==============
Copy link
Member

@JohnTitor JohnTitor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment on the issue.

@JohnTitor JohnTitor merged commit 7f163ea into master May 25, 2020
@JohnTitor JohnTitor deleted the autofix/ices/68532.rs branch May 25, 2020 12:26
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