Skip to content

Type macros allow types to be followed by ; #30007

Closed
@jonas-schievink

Description

@jonas-schievink

This compiles:

#![feature(type_macros)]

macro_rules! t {
    () => ( String ; );
}

fn main() {
    let i: Vec<t!()>;
}

I expected this to be rejected, simply because Vec<String;> doesn't parse as a type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions