Skip to content

type_alias_impl_trait is unusable #3079

@Sherlock-Holo

Description

@Sherlock-Holo
#![feature(type_alias_impl_trait)]

fn main() {}

type Adder = impl Fn(usize) -> usize;

this codes should be right like #2515 (comment)
but now cargo check report error

error: could not find defining uses
 --> src/main.rs:5:14
  |
5 | type Adder = impl Fn(usize) -> usize;
  |              ^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error

error: could not compile `learn`

To learn more, run the command again with --verbose.

the cargo version is cargo 1.51.0-nightly (ab64d1393 2021-02-10)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions