Closed
Description
With rustc 1.35.0-nightly (26b4cb484 2019-03-09)
The following code
type Bar = ();
async fn foo() -> Bar { }
produces the following warning
warning: type alias is never used: `Bar`
--> src/main.rs:3:1
|
3 | type Bar = ();
| ^^^^^^^^^^^^^^
|
= note: #[warn(dead_code)] on by default
When Bar
is clearly used here.
This seem to only trigger if the alias is used in the return type position
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
sanxiyn commentedon Mar 11, 2019
This is unrelated to async fn as one can reproduce with just impl Trait:
Rollup merge of rust-lang#59129 - sanxiyn:visit-impl-trait, r=varkor