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

ices/98702.rs: fixed with no errors #1366

Merged
merged 1 commit into from
Jul 31, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#98702

#![feature(generic_associated_types)]

struct Node<T, const N : usize, const P : usize> {
    data : [[T; N]; P]
}

trait NodeT<const N : usize> {
    type Node<T>;
}

struct NodeLookup;

macro_rules! impl_lookup {
    ($($n:literal)*) => { $(
        impl NodeT<$n> for NodeLookup {
            type Node<T> = Node<T, $n, {$n*$n}>;
        }
    )* }
}

impl_lookup!(1 2 3 4);

fn main() {}
=== stdout ===
=== stderr ===
warning: field `data` is never read
 --> /home/runner/work/glacier/glacier/ices/98702.rs:4:5
  |
3 | struct Node<T, const N : usize, const P : usize> {
  |        ---- field in this struct
4 |     data : [[T; N]; P]
  |     ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: field `data` is never read
 --> /home/runner/work/glacier/glacier/ices/98702.rs:4:5
  |
3 | struct Node<T, const N : usize, const P : usize> {
  |        ---- field in this struct
4 |     data : [[T; N]; P]
  |     ^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

==============
@JohnTitor JohnTitor merged commit 9583582 into master Jul 31, 2022
@JohnTitor JohnTitor deleted the autofix/ices/98702.rs branch July 31, 2022 08:06
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