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

ices/97047-1.rs: fixed with no errors #1326

Merged
merged 1 commit into from
Jun 30, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#97047

#![feature(adt_const_params, generic_const_exprs)]

pub struct Changes<const CHANGES: &'static [&'static str]>
where
    [(); CHANGES.len()]:,
{
    changes: [usize; CHANGES.len()],
}

impl<const CHANGES: &'static [&'static str]> Changes<CHANGES>
where
    [(); CHANGES.len()]:,
{
    pub const fn new() -> Self {
        Self {
            changes: [0; CHANGES.len()],
        }
    }
}

pub fn main() {}
=== stdout ===
=== stderr ===
warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:1:12
  |
1 | #![feature(adt_const_params, generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #95174 <https://github.com/rust-lang/rust/issues/95174> for more information

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:1:30
  |
1 | #![feature(adt_const_params, generic_const_exprs)]
  |                              ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

warning: field `changes` is never read
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:7:5
  |
3 | pub struct Changes<const CHANGES: &'static [&'static str]>
  |            ------- field in this struct
...
7 |     changes: [usize; CHANGES.len()],
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 3 warnings emitted

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

=== stdout ===
=== stderr ===
warning: the feature `adt_const_params` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:1:12
  |
1 | #![feature(adt_const_params, generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #95174 <rust-lang/rust#95174> for more information

warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:1:30
  |
1 | #![feature(adt_const_params, generic_const_exprs)]
  |                              ^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information

warning: field `changes` is never read
 --> /home/runner/work/glacier/glacier/ices/97047-1.rs:7:5
  |
3 | pub struct Changes<const CHANGES: &'static [&'static str]>
  |            ------- field in this struct
...
7 |     changes: [usize; CHANGES.len()],
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 3 warnings emitted

==============
@Alexendoo Alexendoo merged commit f9aa44e into master Jun 30, 2022
@Alexendoo Alexendoo deleted the autofix/ices/97047-1.rs branch June 30, 2022 10:32
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