diff options
| author | Andy Wang <cbeuw.andy@gmail.com> | 2023-03-20 12:21:19 +0100 |
|---|---|---|
| committer | Andy Wang <cbeuw.andy@gmail.com> | 2023-03-20 12:21:19 +0100 |
| commit | 9da1da94efd45cf28e9e72c81cacbdbcb1aeabd1 (patch) | |
| tree | 3ee8f3fd0563004f84b26a54541bb0f3b4c65fcb /library/core/src | |
| parent | ab9bb3ea368b2412531a3e8c07ba73d1dd690134 (diff) | |
| download | rust-9da1da94efd45cf28e9e72c81cacbdbcb1aeabd1.tar.gz rust-9da1da94efd45cf28e9e72c81cacbdbcb1aeabd1.zip | |
Allow optional RET type annotation
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/intrinsics/mir.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/library/core/src/intrinsics/mir.rs b/library/core/src/intrinsics/mir.rs index d2d9771bdce..f391474b843 100644 --- a/library/core/src/intrinsics/mir.rs +++ b/library/core/src/intrinsics/mir.rs @@ -342,6 +342,7 @@ define!( #[rustc_macro_transparency = "transparent"] pub macro mir { ( + $(type RET = $ret_ty:ty ;)? $(let $local_decl:ident $(: $local_decl_ty:ty)? ;)* { @@ -362,7 +363,7 @@ pub macro mir { { // Now all locals #[allow(non_snake_case)] - let RET; + let RET $(: $ret_ty)?; $( let $local_decl $(: $local_decl_ty)? ; )* |
