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

ices/93688.sh: fixed with no errors #1136

Merged
merged 1 commit into from
Feb 17, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#93688

rustc -Zmir-opt-level=3 --emit=mir -Zdump-mir=all  - 2>&1 << EOF

// run-pass

#![allow(dead_code, unused_imports)]
#![feature(no_core)]
#![no_core]
// edition:2018

extern crate std;
extern crate core;
use core::{prelude::v1::*, *};

fn foo() {
    for _ in &[()] {}
}

fn bar() -> Option<()> {
    None?
}

fn main() {}


fn bar2() -> Option<()> {
    None?
}

fn bar3() {
    match Option::<Option<()>>::None {
        Some(v) => {}
        None => {}
    }
}

EOF
=== stdout ===
warning: unused variable: `v`
  --> <anon>:30:14
   |
30 |         Some(v) => {}
   |              ^ help: if this is intentional, prefix it with an underscore: `_v`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

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

=== stdout ===
warning: unused variable: `v`
  --> <anon>:30:14
   |
30 |         Some(v) => {}
   |              ^ help: if this is intentional, prefix it with an underscore: `_v`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: 1 warning emitted

=== stderr ===
==============
@Alexendoo Alexendoo merged commit 310959b into master Feb 17, 2022
@Alexendoo Alexendoo deleted the autofix/ices/93688.sh branch February 17, 2022 13:31
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