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

ices/90177.rs: fixed with no errors #1006

Merged
merged 1 commit into from
Nov 6, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Nov 6, 2021

Issue: rust-lang/rust#90177

trait Base<'f> {
    type Assoc;

    fn do_something(&self);
}

trait ForAnyLifetime: for<'f> Base<'f> {}

impl<T> ForAnyLifetime for T where T: for<'f> Base<'f> {}

trait CanBeDynamic: ForAnyLifetime + for<'f> Base<'f, Assoc = ()> {}

fn foo(a: &dyn CanBeDynamic) {
    a.do_something();
}

fn main() {}
=== stdout ===
=== stderr ===
warning: function is never used: `foo`
  --> /home/runner/work/glacier/glacier/ices/90177.rs:13:4
   |
13 | fn foo(a: &dyn CanBeDynamic) {
   |    ^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: function is never used: `foo`
  --> /home/runner/work/glacier/glacier/ices/90177.rs:13:4
   |
13 | fn foo(a: &dyn CanBeDynamic) {
   |    ^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

==============
@Alexendoo Alexendoo merged commit 73cbd50 into master Nov 6, 2021
@Alexendoo Alexendoo deleted the autofix/ices/90177.rs branch November 6, 2021 12:08
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