diff options
author | Seivan Heidari <[email protected]> | 2019-11-11 13:31:09 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-11 13:31:09 +0000 |
commit | 68a5ff050faf514e9d122212a66703ca8ce66ab7 (patch) | |
tree | 0c389d2680aae82c1805a52f8315312724134341 /crates/ra_hir/src/ty/tests.rs | |
parent | 7cd075ff0beb97039cd1d1c6c021abf89339731b (diff) | |
parent | a599147b4232c0d4f6b071a3a96e86f903f4cf52 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
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 | } | ||