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

ices/112631.rs: fixed with no errors #1700

Merged
merged 1 commit into from
Nov 28, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#112631

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

struct Foo<T>(T);

impl<'a> Foo<fn(&'a ())> {
    type Assoc = &'a ();
}

fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)) {}

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

warning: associated type `Assoc` is never used
 --> /home/runner/work/glacier/glacier/ices/112631.rs:7:10
  |
6 | impl<'a> Foo<fn(&'a ())> {
  | ------------------------ associated type in this implementation
7 |     type Assoc = &'a ();
  |          ^^^^^

warning: function `bar` is never used
  --> /home/runner/work/glacier/glacier/ices/112631.rs:10:4
   |
10 | fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)) {}
   |    ^^^

warning: 3 warnings emitted

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

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

warning: associated type `Assoc` is never used
 --> /home/runner/work/glacier/glacier/ices/112631.rs:7:10
  |
6 | impl<'a> Foo<fn(&'a ())> {
  | ------------------------ associated type in this implementation
7 |     type Assoc = &'a ();
  |          ^^^^^

warning: function `bar` is never used
  --> /home/runner/work/glacier/glacier/ices/112631.rs:10:4
   |
10 | fn bar(_: for<'a> fn(Foo<fn(Foo<fn(&'static ())>::Assoc)>::Assoc)) {}
   |    ^^^

warning: 3 warnings emitted

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