Skip to content

Type ascription builtin is silently replaced by rustfmt(?) #6159

Closed
@Mark-Simulacrum

Description

@Mark-Simulacrum

rustfmt complains about the type_ascribe macro asking for the builtin to be replaced with the ... : ... syntax:

Error: Diff in /checkout/library/core/src/macros/mod.rs at line 1712:
         reason = "placeholder syntax for type ascription"
     )]
     pub macro type_ascribe($expr:expr, $ty:ty) {
-        builtin # type_ascribe($expr, $ty)
+        $expr: $ty
     }

I've worked around this with #[rustfmt::skip] on the macro which seems to work, but filing an issue since it seems like somewhat odd behavior as well.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions