diff options
Diffstat (limited to 'crates/ra_hir/src/ty/tests.rs')
-rw-r--r-- | crates/ra_hir/src/ty/tests.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index e56b9356e..896bf2924 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs | |||
@@ -4810,3 +4810,22 @@ fn no_such_field_diagnostics() { | |||
4810 | "### | 4810 | "### |
4811 | ); | 4811 | ); |
4812 | } | 4812 | } |
4813 | |||
4814 | #[test] | ||
4815 | fn infer_builtin_macros_line() { | ||
4816 | assert_snapshot!( | ||
4817 | infer(r#" | ||
4818 | #[rustc_builtin_macro] | ||
4819 | macro_rules! line {() => {}} | ||
4820 | |||
4821 | fn main() { | ||
4822 | let x = line!(); | ||
4823 | } | ||
4824 | "#), | ||
4825 | @r###" | ||
4826 | ![0; 1) '6': i32 | ||
4827 | [64; 88) '{ ...!(); }': () | ||
4828 | [74; 75) 'x': i32 | ||
4829 | "### | ||
4830 | ); | ||
4831 | } | ||