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

ices/9307.sh: fixed with no errors #1221

Merged
merged 1 commit into from
Apr 26, 2022
Merged

ices/9307.sh: fixed with no errors #1221

merged 1 commit into from
Apr 26, 2022

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#9307

#!/bin/bash

# Taken from #78806.

rustc --crate-type=lib -Z mir-opt-level=1 -Z new-llvm-pass-manager=yes -Z unsound-mir-opts=yes -Z verify-llvm-ir=yes -Z validate-mir=yes -Z polonius=yes -Z polymorphize=yes -C debuginfo=2 -C opt-level=1 - << EOF
#![feature(no_core, lang_items)]
#![no_core]

#[lang = "sized"]
trait Sized {}

#[lang = "copy"]
trait Copy {}

#[no_mangle]
fn test() {
    &1;
}

EOF
=== stdout ===
=== stderr ===
warning: unused borrow that must be used
  --> <anon>:12:5
   |
12 |     &1;
   |     ^^ the borrow produces a value
   |
   = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
   |
12 |     let _ = &1;
   |     +++++++

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: unused borrow that must be used
  --> <anon>:12:5
   |
12 |     &1;
   |     ^^ the borrow produces a value
   |
   = note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
   |
12 |     let _ = &1;
   |     +++++++

warning: 1 warning emitted

==============
@Alexendoo
Copy link
Member

bisects to rust-lang/rust#96326, not really sure what to do about this one. I'm fairly sure the upstream issue itself isn't fixed

@Alexendoo Alexendoo merged commit 581f5c4 into master Apr 26, 2022
@Alexendoo Alexendoo deleted the autofix/ices/9307.sh branch April 26, 2022 18:05
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants