aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/ra_hir_ty/src/tests/macros.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/crates/ra_hir_ty/src/tests/macros.rs b/crates/ra_hir_ty/src/tests/macros.rs
index 53cd81d46..55386c030 100644
--- a/crates/ra_hir_ty/src/tests/macros.rs
+++ b/crates/ra_hir_ty/src/tests/macros.rs
@@ -420,6 +420,25 @@ fn main() {
420} 420}
421 421
422#[test] 422#[test]
423fn infer_builtin_macros_concat() {
424 assert_snapshot!(
425 infer(r#"
426#[rustc_builtin_macro]
427macro_rules! concat {() => {}}
428
429fn main() {
430 let x = concat!("hello", concat!("world", "!"));
431}
432"#),
433 @r###"
434 ![0; 13) '"helloworld!"': &str
435 [66; 122) '{ ...")); }': ()
436 [76; 77) 'x': &str
437 "###
438 );
439}
440
441#[test]
423fn infer_derive_clone_simple() { 442fn infer_derive_clone_simple() {
424 let (db, pos) = TestDB::with_position( 443 let (db, pos) = TestDB::with_position(
425 r#" 444 r#"