-
Notifications
You must be signed in to change notification settings - Fork 726
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
macros: Add dyn keyword for trait objects in valueset! expansion #2308
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bare_trait_objects lint will become a hard error in Rust 2021. While tracing is still using Rust 2018, bare_trait_objects is a warning in the MSRV and dyn keyword is recommended.
Xiami2012
requested review from
hawkw,
davidbarsky and
a team
as code owners
September 16, 2022 11:48
hawkw
approved these changes
Sep 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks, looks good to me!
(CI failure on nightly is unrelated, it's due to a compiler bug) |
hawkw
pushed a commit
that referenced
this pull request
Sep 19, 2022
…#2308) ## Motivation `bare_trait_objects` lint will become a hard error in Rust 2021. While tracing is still using Rust 2018, `bare_trait_objects` is a warning in the MSRV and `dyn` keyword is recommended. ## Solution Replace all `&Value` with `&dyn Value` in macro expansions.
hawkw
pushed a commit
that referenced
this pull request
Sep 19, 2022
…#2308) ## Motivation `bare_trait_objects` lint will become a hard error in Rust 2021. While tracing is still using Rust 2018, `bare_trait_objects` is a warning in the MSRV and `dyn` keyword is recommended. ## Solution Replace all `&Value` with `&dyn Value` in macro expansions.
hawkw
added a commit
that referenced
this pull request
Oct 6, 2022
# 0.1.37 (October 6, 2022) This release of `tracing` incorporates changes from `tracing-core` [v0.1.30][core-0.1.30] and `tracing-attributes` [v0.1.23][0.1.23], including the new `Subscriber::on_register_dispatch` method for performing late initialization after a `Subscriber` is registered as a `Dispatch`, and bugfixes for the `#[instrument]` attribute. Additionally, it fixes instances of the `bare_trait_objects` lint, which is now a warning on `tracing`'s MSRV and will become an error in the next edition. ### Fixed - **attributes**: Incorrect handling of inner attributes in `#[instrument]`ed functions (#2307) - **attributes**: Incorrect location of compiler diagnostic spans generated for type errors in `#[instrument]`ed `async fn`s (#2270) - **attributes**: Updated `syn` dependency to fix compilation with `-Z minimal-versions` (#2246) - `bare_trait_objects` warning in `valueset!` macro expansion (#2308) ### Added - **core**: `Subscriber::on_register_dispatch` method (#2269) - **core**: `WeakDispatch` type and `Dispatch::downgrade()` function (#2293) ### Changed - `tracing-core`: updated to [0.1.30][core-0.1.30] - `tracing-attributes`: updated to [0.1.23][attrs-0.1.23] ### Documented - Added [`tracing-web`] and [`reqwest-tracing`] to related crates (#2283], [#2331) Thanks to new contributors @compiler-errors, @e-nomem, @WorldSEnder, @Xiami2012, and @tl-rodrigo-gryzinski, as well as @jswrenn and @CAD97, for contributing to this release! [core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30 [attrs-0.1.23]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.23 [`tracing-web`]: https://crates.io/crates/tracing-web/ [`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing/
hawkw
added a commit
that referenced
this pull request
Oct 6, 2022
# 0.1.37 (October 6, 2022) This release of `tracing` incorporates changes from `tracing-core` [v0.1.30][core-0.1.30] and `tracing-attributes` [v0.1.23][attrs-0.1.23], including the new `Subscriber::on_register_dispatch` method for performing late initialization after a `Subscriber` is registered as a `Dispatch`, and bugfixes for the `#[instrument]` attribute. Additionally, it fixes instances of the `bare_trait_objects` lint, which is now a warning on `tracing`'s MSRV and will become an error in the next edition. ### Fixed - **attributes**: Incorrect handling of inner attributes in `#[instrument]`ed functions (#2307) - **attributes**: Incorrect location of compiler diagnostic spans generated for type errors in `#[instrument]`ed `async fn`s (#2270) - **attributes**: Updated `syn` dependency to fix compilation with `-Z minimal-versions` (#2246) - `bare_trait_objects` warning in `valueset!` macro expansion (#2308) ### Added - **core**: `Subscriber::on_register_dispatch` method (#2269) - **core**: `WeakDispatch` type and `Dispatch::downgrade()` function (#2293) ### Changed - `tracing-core`: updated to [0.1.30][core-0.1.30] - `tracing-attributes`: updated to [0.1.23][attrs-0.1.23] ### Documented - Added [`tracing-web`] and [`reqwest-tracing`] to related crates (#2283, #2331) Thanks to new contributors @compiler-errors, @e-nomem, @WorldSEnder, @Xiami2012, and @tl-rodrigo-gryzinski, as well as @jswrenn and @CAD97, for contributing to this release! [core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30 [attrs-0.1.23]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.23 [`tracing-web`]: https://crates.io/crates/tracing-web/ [`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing/
kaffarell
pushed a commit
to kaffarell/tracing
that referenced
this pull request
May 22, 2024
# 0.1.37 (October 6, 2022) This release of `tracing` incorporates changes from `tracing-core` [v0.1.30][core-0.1.30] and `tracing-attributes` [v0.1.23][attrs-0.1.23], including the new `Subscriber::on_register_dispatch` method for performing late initialization after a `Subscriber` is registered as a `Dispatch`, and bugfixes for the `#[instrument]` attribute. Additionally, it fixes instances of the `bare_trait_objects` lint, which is now a warning on `tracing`'s MSRV and will become an error in the next edition. ### Fixed - **attributes**: Incorrect handling of inner attributes in `#[instrument]`ed functions (tokio-rs#2307) - **attributes**: Incorrect location of compiler diagnostic spans generated for type errors in `#[instrument]`ed `async fn`s (tokio-rs#2270) - **attributes**: Updated `syn` dependency to fix compilation with `-Z minimal-versions` (tokio-rs#2246) - `bare_trait_objects` warning in `valueset!` macro expansion (tokio-rs#2308) ### Added - **core**: `Subscriber::on_register_dispatch` method (tokio-rs#2269) - **core**: `WeakDispatch` type and `Dispatch::downgrade()` function (tokio-rs#2293) ### Changed - `tracing-core`: updated to [0.1.30][core-0.1.30] - `tracing-attributes`: updated to [0.1.23][attrs-0.1.23] ### Documented - Added [`tracing-web`] and [`reqwest-tracing`] to related crates (tokio-rs#2283, tokio-rs#2331) Thanks to new contributors @compiler-errors, @e-nomem, @WorldSEnder, @Xiami2012, and @tl-rodrigo-gryzinski, as well as @jswrenn and @CAD97, for contributing to this release! [core-0.1.30]: https://github.com/tokio-rs/tracing/releases/tag/tracing-core-0.1.30 [attrs-0.1.23]: https://github.com/tokio-rs/tracing/releases/tag/tracing-attributes-0.1.23 [`tracing-web`]: https://crates.io/crates/tracing-web/ [`reqwest-tracing`]: https://crates.io/crates/reqwest-tracing/
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
bare_trait_objects
lint will become a hard error in Rust 2021.While tracing is still using Rust 2018,
bare_trait_objects
is a warning in the MSRV anddyn
keyword is recommended.Solution
Replace all
&Value
with&dyn Value
in macro expansions.