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

ices/110106.rs: fixed with no errors #1699

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#110106

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

struct D<T> {
  a: T
}

impl<T: Default> D<T> {
    type Item = T;

    fn next() -> Self::Item {
        Self::Item::default()
    }
}


fn main() {
}
=== stdout ===
=== stderr ===
warning: struct `D` is never constructed
 --> /home/runner/work/glacier/glacier/ices/110106.rs:4:8
  |
4 | struct D<T> {
  |        ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated items `Item` and `next` are never used
  --> /home/runner/work/glacier/glacier/ices/110106.rs:9:10
   |
8  | impl<T: Default> D<T> {
   | --------------------- associated items in this implementation
9  |     type Item = T;
   |          ^^^^
10 |
11 |     fn next() -> Self::Item {
   |        ^^^^

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: struct `D` is never constructed
 --> /home/runner/work/glacier/glacier/ices/110106.rs:4:8
  |
4 | struct D<T> {
  |        ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: associated items `Item` and `next` are never used
  --> /home/runner/work/glacier/glacier/ices/110106.rs:9:10
   |
8  | impl<T: Default> D<T> {
   | --------------------- associated items in this implementation
9  |     type Item = T;
   |          ^^^^
10 |
11 |     fn next() -> Self::Item {
   |        ^^^^

warning: 2 warnings emitted

==============
@JohnTitor JohnTitor merged commit b016b93 into master Nov 28, 2023
@JohnTitor JohnTitor deleted the autofix/ices/110106.rs branch November 28, 2023 11:50
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.

None yet

2 participants