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

ices/68684-1.rs: fixed with no errors #291

Merged
merged 1 commit into from
Feb 16, 2020
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#68684

enum Enum {
    A(),
}

impl Enum {
    const fn a() -> Self {
        return Self::A();
    }
}

pub fn main() {
    const A: Enum = Enum::a();
}
=== stdout ===
=== stderr ===
warning: enum is never used: `Enum`
 --> /home/runner/work/glacier/glacier/ices/68684-1.rs:1:6
  |
1 | enum Enum {
  |      ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: method is never used: `a`
 --> /home/runner/work/glacier/glacier/ices/68684-1.rs:6:5
  |
6 |     const fn a() -> Self {
  |     ^^^^^^^^^^^^^^^^^^^^

warning: constant item is never used: `A`
  --> /home/runner/work/glacier/glacier/ices/68684-1.rs:12:5
   |
12 |     const A: Enum = Enum::a();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

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

=== stdout ===
=== stderr ===
warning: enum is never used: `Enum`
 --> /home/runner/work/glacier/glacier/ices/68684-1.rs:1:6
  |
1 | enum Enum {
  |      ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: method is never used: `a`
 --> /home/runner/work/glacier/glacier/ices/68684-1.rs:6:5
  |
6 |     const fn a() -> Self {
  |     ^^^^^^^^^^^^^^^^^^^^

warning: constant item is never used: `A`
  --> /home/runner/work/glacier/glacier/ices/68684-1.rs:12:5
   |
12 |     const A: Enum = Enum::a();
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^

==============
@Alexendoo Alexendoo merged commit 36e85a4 into master Feb 16, 2020
@Alexendoo Alexendoo deleted the autofix/ices/68684-1.rs branch February 16, 2020 13:35
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