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

ices/100689.rs: fixed with no errors #1450

Merged
merged 1 commit into from
Oct 18, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#100689

#![feature(generic_associated_types)]

struct Foo<'a> {
    foo: &'a mut usize,
}

trait Bar<'a> {
    type FooRef<'b>
    where
        'a : 'b,
    ;
    fn uwu (
        foo: Foo<'a>,
        f: impl for<'b> FnMut(Self::FooRef<'b>),
    )
    ;
}
impl<'a> Bar<'a> for () {
    type FooRef<'b>
    =
        &'b Foo<'a>
    where
        'a : 'b,
    ;
    
    fn uwu (
        foo: Foo<'a>,
        mut f: impl for<'b> FnMut(&'b Foo<'a>), //relevant part
    )
    {
        f(&foo);
    }
}

fn main() {}
=== stdout ===
=== stderr ===
warning: the feature `generic_associated_types` has been stable since 1.65.0 and no longer requires an attribute to enable
 --> /home/runner/work/glacier/glacier/ices/100689.rs:1:12
  |
1 | #![feature(generic_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

warning: field `foo` is never read
 --> /home/runner/work/glacier/glacier/ices/100689.rs:4:5
  |
3 | struct Foo<'a> {
  |        --- field in this struct
4 |     foo: &'a mut usize,
  |     ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: the feature `generic_associated_types` has been stable since 1.65.0 and no longer requires an attribute to enable
 --> /home/runner/work/glacier/glacier/ices/100689.rs:1:12
  |
1 | #![feature(generic_associated_types)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(stable_features)]` on by default

warning: field `foo` is never read
 --> /home/runner/work/glacier/glacier/ices/100689.rs:4:5
  |
3 | struct Foo<'a> {
  |        --- field in this struct
4 |     foo: &'a mut usize,
  |     ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 2 warnings emitted

==============
@Alexendoo Alexendoo merged commit 2989305 into master Oct 18, 2022
@Alexendoo Alexendoo deleted the autofix/ices/100689.rs branch October 18, 2022 22:24
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