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

macros: Add dyn keyword for trait objects in valueset! expansion #2308

Merged
merged 2 commits into from
Sep 16, 2022

Conversation

Xiami2012
Copy link
Contributor

@Xiami2012 Xiami2012 commented Sep 16, 2022

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.

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.
Copy link
Member

@hawkw hawkw left a 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!

@hawkw
Copy link
Member

hawkw commented Sep 16, 2022

(CI failure on nightly is unrelated, it's due to a compiler bug)

@hawkw hawkw enabled auto-merge (squash) September 16, 2022 20:34
@hawkw hawkw merged commit a77be16 into tokio-rs:master Sep 16, 2022
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants