-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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: Disambiguate the built-in #[test] attribute in macro expansion. #2503
Conversation
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.
I assume this is not a breaking change?
I guess that depends on whether or not this is supposed to be supported today: use some_other_lib::test;
#[tokio::test]
async fn some_test() { } Currently, the |
seems fine to me |
CI appears to be stuck, and I can't restart it. |
`tokio::test` and related macros now use the absolute path `::core::prelude::v1::test` to refer to the built-in `test` macro. This absolute path was introduced in rust-lang/rust#62086.
2077109
to
a7e6771
Compare
The CI failures (on Windows) appear to be unrelated to this change:
They look familiar, but I don't know off the top of my head which other PR did this. |
tokio-rs#2503) `tokio::test` and related macros now use the absolute path `::core::prelude::v1::test` to refer to the built-in `test` macro. This absolute path was introduced in rust-lang/rust#62086.
I want to know how to test async function. |
Please open a new discussion if you have a question. |
tokio::test
and related macros now use the absolute path::core::prelude::v1::test
to refer to the built-intest
macro.This absolute path was introduced in rust-lang/rust#62086.
Motivation
The following example currently fails due to shadowing of the
test
macro (playground):