aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_hir_ty/src/tests
diff options
context:
space:
mode:
authorEdwin Cheng <[email protected]>2020-03-02 06:05:21 +0000
committerEdwin Cheng <[email protected]>2020-03-03 17:21:14 +0000
commitfe04c28b5928469bd1e0df48091d80e998da5920 (patch)
tree8dd99a8f6f2c64ac7f5513cb95eb456cd39cfff8 /crates/ra_hir_ty/src/tests
parent1465cc0c4feb52958d3281f066a663e0a52ed67e (diff)
Add test
Diffstat (limited to 'crates/ra_hir_ty/src/tests')
-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#"