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

ices/86535.rs: fixed with no errors #937

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86535

#![allow(incomplete_features)]
#![feature(const_generics)]
#![feature(const_evaluatable_checked)]

struct F<const S: &'static str>;
impl<const S: &'static str> X for F<{ S }> {
    const W: usize = 3;

    fn d(r: &[u8; Self::W]) -> F<{ S }> {
        let x: [u8; Self::W] = [0; Self::W];
        F
    }
}

pub trait X {
    const W: usize;
    fn d(r: &[u8; Self::W]) -> Self;
}

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

warning: unused variable: `r`
 --> /home/runner/work/glacier/glacier/ices/86535.rs:9:10
  |
9 |     fn d(r: &[u8; Self::W]) -> F<{ S }> {
  |          ^ help: if this is intentional, prefix it with an underscore: `_r`

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `x`
  --> /home/runner/work/glacier/glacier/ices/86535.rs:10:13
   |
10 |         let x: [u8; Self::W] = [0; Self::W];
   |             ^ help: if this is intentional, prefix it with an underscore: `_x`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `r`
 --> /home/runner/work/glacier/glacier/ices/86535.rs:9:10
  |
9 |     fn d(r: &[u8; Self::W]) -> F<{ S }> {
  |          ^ help: if this is intentional, prefix it with an underscore: `_r`

warning: 2 warnings emitted

==============
@Alexendoo Alexendoo closed this Aug 29, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86535.rs branch August 29, 2021 12:49
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