Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs')
| -rw-r--r-- | crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs b/crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs index 0f606f3cfd..9e4ab043f6 100644 --- a/crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs +++ b/crates/hir-def/src/macro_expansion_tests/mbe/tt_conversion.rs @@ -175,3 +175,33 @@ const _: () = 0e0; "#]], ); } + +#[test] +fn float_literal_in_tt() { + check( + r#" +macro_rules! constant { + ($( $ret:expr; )*) => {}; +} + +macro_rules! float_const_impl { + () => ( constant!(0.3; 3.3;); ); +} + +float_const_impl! {} +"#, + expect![[r#" +macro_rules! constant { + ($( $ret:expr; )*) => {}; +} + +macro_rules! float_const_impl { + () => ( constant!(0.3; 3.3;); ); +} + +constant!(0.3; +3.3; +); +"#]], + ); +} |