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

ices/98476-1.sh: fixed with no errors #1341

Merged
merged 1 commit into from
Jul 15, 2022
Merged

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#98476

#!/bin/bash

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

fn main() {
    let _ = foo();
}

async fn from_config(_: Config) {}

async fn foo() {
    from_config(Config {
        nickname: None,
        ..Default::default()
    })
    .await;
}

#[derive(Default)]
struct Config {
    nickname: Option<Box<u8>>,
}

EOF

=== stdout ===
=== stderr ===
warning: field `nickname` is never read
  --> <anon>:18:5
   |
17 | struct Config {
   |        ------ field in this struct
18 |     nickname: Option<Box<u8>>,
   |     ^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

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

=== stdout ===
=== stderr ===
warning: field `nickname` is never read
  --> <anon>:18:5
   |
17 | struct Config {
   |        ------ field in this struct
18 |     nickname: Option<Box<u8>>,
   |     ^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

warning: 1 warning emitted

==============
@JohnTitor JohnTitor merged commit 7346509 into master Jul 15, 2022
@JohnTitor JohnTitor deleted the autofix/ices/98476-1.sh branch July 15, 2022 06:24
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