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

ices/88876.rs: fixed with no errors #975

Merged
merged 1 commit into from
Sep 23, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#88876

#![allow(incomplete_features)]
#![feature(adt_const_params)]

struct FooConst<const ARRAY: &'static [&'static str]> {}

const FOO_ARR: &[&'static str; 2] = &["Hello", "Friend"];

fn main() {
    // Commenting the following line avoids the panic.
    let foo = FooConst::<FOO_ARR> {};
}
=== stdout ===
=== stderr ===
warning: unused variable: `foo`
  --> /home/runner/work/glacier/glacier/ices/88876.rs:10:9
   |
10 |     let foo = FooConst::<FOO_ARR> {};
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `foo`
  --> /home/runner/work/glacier/glacier/ices/88876.rs:10:9
   |
10 |     let foo = FooConst::<FOO_ARR> {};
   |         ^^^ help: if this is intentional, prefix it with an underscore: `_foo`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

==============
@Alexendoo Alexendoo merged commit 349a299 into master Sep 23, 2021
@Alexendoo Alexendoo deleted the autofix/ices/88876.rs branch September 23, 2021 17:04
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