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

ices/101243.sh: fixed with no errors #1411

Merged
merged 1 commit into from
Sep 4, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 4, 2022

Issue: rust-lang/rust#101243

#!/bin/bash

rustc -Zvalidate-mir -Zdrop-tracking --edition=2021 - <<'EOF'

struct Foo {
    a: usize,
    b: &'static u32,
}

fn main() {
    Box::pin(async {
        Foo {
            b: &42,
            a: async { 0 }.await,
        };
    });
}

EOF

=== stdout ===
=== stderr ===
warning: fields `a` and `b` are never read
 --> <anon>:3:5
  |
2 | struct Foo {
  |        --- fields in this struct
3 |     a: usize,
  |     ^
4 |     b: &'static u32,
  |     ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: unused return value of `Box::<T>::pin` that must be used
  --> <anon>:8:5
   |
8  | /     Box::pin(async {
9  | |         Foo {
10 | |             b: &42,
11 | |             a: async { 0 }.await,
12 | |         };
13 | |     });
   | |_______^
   |
   = note: `#[warn(unused_must_use)]` on by default

warning: 2 warnings emitted

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

=== stdout ===
=== stderr ===
warning: fields `a` and `b` are never read
 --> <anon>:3:5
  |
2 | struct Foo {
  |        --- fields in this struct
3 |     a: usize,
  |     ^
4 |     b: &'static u32,
  |     ^
  |
  = note: `#[warn(dead_code)]` on by default

warning: unused return value of `Box::<T>::pin` that must be used
  --> <anon>:8:5
   |
8  | /     Box::pin(async {
9  | |         Foo {
10 | |             b: &42,
11 | |             a: async { 0 }.await,
12 | |         };
13 | |     });
   | |_______^
   |
   = note: `#[warn(unused_must_use)]` on by default

warning: 2 warnings emitted

==============
@Alexendoo Alexendoo merged commit 955ed0d into master Sep 4, 2022
@Alexendoo Alexendoo deleted the autofix/ices/101243.sh branch September 4, 2022 12:27
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