diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-03-09 09:11:40 +0900 |
|---|---|---|
| committer | Yuki Okushi <huyuumi.dev@gmail.com> | 2020-03-09 09:11:40 +0900 |
| commit | af0c44cb2908989159322a4f2bf6ce046a7be5fc (patch) | |
| tree | dd70e4d55b1a48a711a4710140be037a8e31df5e | |
| parent | 564758c4c329e89722454dd2fbb35f1ac0b8b47c (diff) | |
| download | rust-af0c44cb2908989159322a4f2bf6ce046a7be5fc.tar.gz rust-af0c44cb2908989159322a4f2bf6ce046a7be5fc.zip | |
Add test for issue-54239
| -rw-r--r-- | src/test/ui/async-await/issue-54239-private-type-triggers-lint.rs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/test/ui/async-await/issue-54239-private-type-triggers-lint.rs b/src/test/ui/async-await/issue-54239-private-type-triggers-lint.rs new file mode 100644 index 00000000000..16cf7ad52e4 --- /dev/null +++ b/src/test/ui/async-await/issue-54239-private-type-triggers-lint.rs @@ -0,0 +1,17 @@ +// Regression test for #54239, shouldn't trigger lint. +// check-pass +// edition:2018 + +#![deny(missing_debug_implementations)] + +struct DontLookAtMe(i32); + +async fn secret() -> DontLookAtMe { + DontLookAtMe(41) +} + +pub async fn looking() -> i32 { // Shouldn't trigger lint here. + secret().await.0 +} + +fn main() {} |
