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

ices/93008-2.sh: fixed with no errors #1249

Merged
merged 1 commit into from
May 13, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#93008

#!/usr/bin/env bash

rustc --crate-type lib -Zmir-opt-level=3 - 2>&1 << EOF

#![feature(trivial_bounds)]
trait Foo {
    fn test(self);
}
fn baz<T>()
where
    &'static str: Foo,
{
    "Foo".test()
}

EOF
=== stdout ===
warning: function is never used: `baz`
 --> <anon>:6:4
  |
6 | fn baz<T>()
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
 --> <anon>:8:19
  |
8 |     &'static str: Foo,
  |                   ^^^
  |
  = note: `#[warn(trivial_bounds)]` on by default

warning: 2 warnings emitted

=== stderr ===
==============

=== stdout ===
warning: function is never used: `baz`
 --> <anon>:6:4
  |
6 | fn baz<T>()
  |    ^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: trait bound &'static str: Foo does not depend on any type or lifetime parameters
 --> <anon>:8:19
  |
8 |     &'static str: Foo,
  |                   ^^^
  |
  = note: `#[warn(trivial_bounds)]` on by default

warning: 2 warnings emitted

=== stderr ===
==============
@Alexendoo Alexendoo merged commit 307e468 into master May 13, 2022
@Alexendoo Alexendoo deleted the autofix/ices/93008-2.sh branch May 13, 2022 14:04
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