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

stream: bump version of async-stream #5347

Merged
merged 1 commit into from Jan 5, 2023
Merged

Conversation

loyd
Copy link
Contributor

@loyd loyd commented Jan 5, 2023

The tokio-test crate depends on async-stream v0.3.0 that incorrectly specifies its dependencies.

How to reproduce

Firstly, create an empty project with the next dev deps:

[dev-dependencies]
tokio-test = "0.4.2"

Secondly, fetch minimal versions of deps (cargo +nightly update -Zminimal-versions).

Now it fails to compile (cargo test):

error[E0277]: the trait bound `TokenStream2: From<proc_macro2::TokenTree>` is not satisfied
  --> /home/.cargo/registry/src/github.com-1ecc6299db9ec823/async-stream-impl-0.3.0/src/lib.rs:17:36
   |
17 |     let input = TokenStream2::from(TokenTree::Group(Group::new(Delimiter::Brace, input)));
   |                 ------------------ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `From<proc_macro2::TokenTree>` is not implemented for `TokenStream2`
   |                 |
   |                 required by a bound introduced by this call
   |
   = help: the trait `From<proc_macro::TokenStream>` is implemented for `TokenStream2`

It occurs because async-stream v0.3.0 wrongly specifies proc-macro2 = "1" but uses conversion added in v1.0.2.

The latest async-stream doesn't use this conversion, so there is no error.

@Darksonn Darksonn added the A-tokio-test Area: The tokio-test crate label Jan 5, 2023
Copy link
Contributor

@Darksonn Darksonn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@Darksonn Darksonn merged commit 21b233f into tokio-rs:master Jan 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio-test Area: The tokio-test crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants