Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

attributes: update trybuild, fix warnings #2322

Merged
merged 2 commits into from Sep 23, 2022
Merged

attributes: update trybuild, fix warnings #2322

merged 2 commits into from Sep 23, 2022

Conversation

hawkw
Copy link
Member

@hawkw hawkw commented Sep 23, 2022

  • attributes: suppress dead code warnings for compile tests

    The async_fn test file in tracing-attributes contains several
    functions that exist just to test whether they compile, rather than
    make assertions about their behavior. Because these functions are never
    called, they (naturally) emit dead code warnings.

    This commit adds #[allow(dead_code)] to the compilation tests, plus a
    comment explaining why we do this.

  • attributes: update trybuild output for Rust 1.64.0

    The error messages for these tests appear to have changed a bit with
    Rust 1.64. This branch runs the tests with TRYBUILD=overwrite to
    update for the latest Rust.

@hawkw hawkw requested review from davidbarsky and a team as code owners September 23, 2022 21:44
hawkw added a commit that referenced this pull request Sep 23, 2022
The error messages for these tests appear to have changed a bit with
Rust 1.64. This branch runs the tests with `TRYBUILD=overwrite` to
update for the latest Rust.
hawkw added a commit that referenced this pull request Sep 23, 2022
The `async_fn` test file in `tracing-attributes` contains several
functions that exist just to test whether they _compile_, rather than
make assertions about their behavior. Because these functions are never
called, they (naturally) emit dead code warnings.

This commit adds `#[allow(dead_code)]` to the compilation tests, plus a
comment explaining why we do this.
@hawkw hawkw enabled auto-merge (rebase) September 23, 2022 21:45
@davidbarsky
Copy link
Member

Before merging this, I'd change the description of the commit to not say "This branch runs the tests with TRYBUILD=overwrite to update for the latest Rust."; the tense made me think that it would be run each time the tests run. Re-reading things, it's more clear to me, but someone scanning the commit log might not fully get that. do you mind rephrasing that slightly?

The error messages for these tests appear to have changed a bit with
Rust 1.64. This commit includes changes to the `.stderr` file after
running the tests with `TRYBUILD=overwrite`, in order to update the
expected output for the latest Rust.
The `async_fn` test file in `tracing-attributes` contains several
functions that exist just to test whether they _compile_, rather than
make assertions about their behavior. Because these functions are never
called, they (naturally) emit dead code warnings.

This commit adds `#[allow(dead_code)]` to the compilation tests, plus a
comment explaining why we do this.
@hawkw
Copy link
Member Author

hawkw commented Sep 23, 2022

Before merging this, I'd change the description of the commit to not say "This branch runs the tests with TRYBUILD=overwrite to update for the latest Rust."; the tense made me think that it would be run each time the tests run. Re-reading things, it's more clear to me, but someone scanning the commit log might not fully get that. do you mind rephrasing that slightly?

Yup, good suggestion! I've reworded the commit message: 13e32ea

@hawkw hawkw merged commit ed3c9b6 into master Sep 23, 2022
@hawkw hawkw deleted the eliza/fix-trybuild branch September 23, 2022 22:58
hawkw added a commit that referenced this pull request Sep 23, 2022
The error messages for these tests appear to have changed a bit with
Rust 1.64. This commit includes changes to the `.stderr` file after
running the tests with `TRYBUILD=overwrite`, in order to update the
expected output for the latest Rust.
hawkw added a commit that referenced this pull request Sep 24, 2022
The error messages for these tests appear to have changed a bit with
Rust 1.64. This commit includes changes to the `.stderr` file after
running the tests with `TRYBUILD=overwrite`, in order to update the
expected output for the latest Rust.
hawkw added a commit that referenced this pull request Sep 24, 2022
The `async_fn` test file in `tracing-attributes` contains several
functions that exist just to test whether they _compile_, rather than
make assertions about their behavior. Because these functions are never
called, they (naturally) emit dead code warnings.

This commit adds `#[allow(dead_code)]` to the compilation tests, plus a
comment explaining why we do this.
hawkw added a commit that referenced this pull request Sep 30, 2022
The error messages for these tests appear to have changed a bit with
Rust 1.64. This commit includes changes to the `.stderr` file after
running the tests with `TRYBUILD=overwrite`, in order to update the
expected output for the latest Rust.
hawkw added a commit that referenced this pull request Sep 30, 2022
The `async_fn` test file in `tracing-attributes` contains several
functions that exist just to test whether they _compile_, rather than
make assertions about their behavior. Because these functions are never
called, they (naturally) emit dead code warnings.

This commit adds `#[allow(dead_code)]` to the compilation tests, plus a
comment explaining why we do this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants