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

ices/93008-1.sh: fixed with no errors #1248

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

pub fn foo<'a, T>(s: &'a mut ()) where &'a mut (): Clone {
    <&mut () as Clone>::clone(&s);
}

fn main() {}

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

warning: unused return value of `clone` that must be used
 --> <anon>:3:5
  |
3 |     <&mut () as Clone>::clone(&s);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_must_use)]` on by default
  = note: cloning is often expensive and is not expected to have side effects

warning: 2 warnings emitted

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

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

warning: unused return value of `clone` that must be used
 --> <anon>:3:5
  |
3 |     <&mut () as Clone>::clone(&s);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_must_use)]` on by default
  = note: cloning is often expensive and is not expected to have side effects

warning: 2 warnings emitted

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