From 786544f022418ed7813e401aded31e4bd5451391 Mon Sep 17 00:00:00 2001 From: kjeremy Date: Fri, 22 Nov 2019 10:05:04 -0500 Subject: Expand file! to dummy "" --- crates/ra_hir/src/ty/tests.rs | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'crates/ra_hir/src') diff --git a/crates/ra_hir/src/ty/tests.rs b/crates/ra_hir/src/ty/tests.rs index 74c12a0a2..b4bdd81f6 100644 --- a/crates/ra_hir/src/ty/tests.rs +++ b/crates/ra_hir/src/ty/tests.rs @@ -4857,3 +4857,22 @@ fn main() { "### ); } + +#[test] +fn infer_builtin_macros_file() { + assert_snapshot!( + infer(r#" +#[rustc_builtin_macro] +macro_rules! file {() => {}} + +fn main() { + let x = file!(); +} +"#), + @r###" + ![0; 2) '""': &str + [64; 88) '{ ...!(); }': () + [74; 75) 'x': &str + "### + ); +} -- cgit v1.2.3