Closed
Description
#![feature(async_await, await_macro, futures_api)]
#![deny(missing_debug_implementations)]
struct DontLookAtMe(i32);
async fn secret() -> DontLookAtMe {
DontLookAtMe(41)
}
// Comment this function out to fix the lint...
pub async fn looking() -> i32 {
await!(secret()).0
}
fn main() {
}
Playground: https://play.rust-lang.org/?gist=0baad2fb680123d124806d6269c15c43&version=nightly&mode=debug&edition=2018
The DontLookAtMe
struct isn't public, so it normally shouldn't trigger the missing_debug_implementations
lint. But once await!
is used on a future that happens to be holding the field somewhere inside, it trips the lint:
error: type does not implement `fmt::Debug`; consider adding #[derive(Debug)] or a manual implementation
--> src/main.rs:4:1
|
4 | struct DontLookAtMe(i32);
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: lint level defined here
--> src/main.rs:2:9
|
2 | #![deny(missing_debug_implementations)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Metadata
Metadata
Assignees
Labels
Area: Async & AwaitArea: CoroutinesArea: Lints (warnings about flaws in source code) such as unused_mut.Async-await issues that have been triaged during a working group meeting.Category: This is a bug.Call for participation: An issue has been fixed and does not reproduce, but no test has been added.Relevant to the compiler team, which will review and decide on the PR/issue.