Skip to content

Commit 4523192

Browse files
committed
Allow optional RET type annotation
1 parent 8c614e4 commit 4523192

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/intrinsics/mir.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ define!(
342342
#[rustc_macro_transparency = "transparent"]
343343
pub macro mir {
344344
(
345+
$(type RET = $ret_ty:ty ;)?
345346
$(let $local_decl:ident $(: $local_decl_ty:ty)? ;)*
346347

347348
{
@@ -362,7 +363,7 @@ pub macro mir {
362363
{
363364
// Now all locals
364365
#[allow(non_snake_case)]
365-
let RET;
366+
let RET $(: $ret_ty)?;
366367
$(
367368
let $local_decl $(: $local_decl_ty)? ;
368369
)*

0 commit comments

Comments
 (0)