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

ices/105819.rs: fixed with no errors #1644

Merged
merged 1 commit into from
Oct 15, 2023
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Aug 5, 2023

Issue: rust-lang/rust#105819

#![feature(type_alias_impl_trait)]
// check-pass

fn main() {}

fn upvar() {
    #[derive(Copy, Clone)]
    struct Foo((u32, u32));

    type T = impl Copy;
    let foo: T = Foo((1u32, 2u32));
    let x = move || {
        let Foo((a, b)) = foo;
    };
}
=== stdout ===
=== stderr ===
warning: unused variable: `x`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:12:9
   |
12 |     let x = move || {
   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `a`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:13:18
   |
13 |         let Foo((a, b)) = foo;
   |                  ^ help: if this is intentional, prefix it with an underscore: `_a`

warning: unused variable: `b`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:13:21
   |
13 |         let Foo((a, b)) = foo;
   |                     ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: function `upvar` is never used
 --> /home/runner/work/glacier/glacier/ices/105819.rs:6:4
  |
6 | fn upvar() {
  |    ^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 4 warnings emitted

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

=== stdout ===
=== stderr ===
warning: unused variable: `x`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:12:9
   |
12 |     let x = move || {
   |         ^ help: if this is intentional, prefix it with an underscore: `_x`
   |
   = note: `#[warn(unused_variables)]` on by default

warning: unused variable: `a`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:13:18
   |
13 |         let Foo((a, b)) = foo;
   |                  ^ help: if this is intentional, prefix it with an underscore: `_a`

warning: unused variable: `b`
  --> /home/runner/work/glacier/glacier/ices/105819.rs:13:21
   |
13 |         let Foo((a, b)) = foo;
   |                     ^ help: if this is intentional, prefix it with an underscore: `_b`

warning: function `upvar` is never used
 --> /home/runner/work/glacier/glacier/ices/105819.rs:6:4
  |
6 | fn upvar() {
  |    ^^^^^
  |
  = note: `#[warn(dead_code)]` on by default

warning: 4 warnings emitted

==============
@JohnTitor JohnTitor merged commit 53cf5c8 into master Oct 15, 2023
@JohnTitor JohnTitor deleted the autofix/ices/105819.rs branch October 15, 2023 03:07
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