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 | 51 |
1 files changed, 24 insertions, 27 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 73799574d8..0710b1ac3d 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 @@ -38,7 +38,6 @@ macro_rules! m { let _ = 12E+99_f64; let _ = "rust1"; let _ = -92; - let _ = -1.3e4f32; } } fn f() { @@ -53,7 +52,6 @@ macro_rules! m { let _ = 12E+99_f64; let _ = "rust1"; let _ = -92; - let _ = -1.3e4f32; } } fn f() { @@ -62,7 +60,6 @@ fn f() { let _ = 12E+99_f64; let _ = "rust1"; let _ = -92; - let _ = -1.3e4f32; } "#]], ); @@ -153,30 +150,6 @@ $ = (); } #[test] -fn float_literal_in_output() { - check( - r#" -macro_rules! constant { - ($e:expr ;) => {$e}; -} - -const _: () = constant!(0.0;); -const _: () = constant!(0.;); -const _: () = constant!(0e0;); -"#, - expect![[r#" -macro_rules! constant { - ($e:expr ;) => {$e}; -} - -const _: () = 0.0; -const _: () = 0.; -const _: () = 0e0; -"#]], - ); -} - -#[test] fn float_literal_in_tt() { check( r#" @@ -201,3 +174,27 @@ constant!(0.3; "#]], ); } + +#[test] +fn float_literal_in_output() { + check( + r#" +macro_rules! constant { + ($e:expr ;) => {$e}; +} + +const _: () = constant!(0.0;); +const _: () = constant!(0.;); +const _: () = constant!(0e0;); +"#, + expect![[r#" +macro_rules! constant { + ($e:expr ;) => {$e}; +} + +const _: () = 0.0; +const _: () = 0.; +const _: () = 0e0; +"#]], + ); +} |