mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Add test
This commit is contained in:
parent
1465cc0c4f
commit
fe04c28b59
1 changed files with 19 additions and 0 deletions
|
@ -419,6 +419,25 @@ fn main() {
|
|||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_builtin_macros_concat() {
|
||||
assert_snapshot!(
|
||||
infer(r#"
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! concat {() => {}}
|
||||
|
||||
fn main() {
|
||||
let x = concat!("hello", concat!("world", "!"));
|
||||
}
|
||||
"#),
|
||||
@r###"
|
||||
![0; 13) '"helloworld!"': &str
|
||||
[66; 122) '{ ...")); }': ()
|
||||
[76; 77) 'x': &str
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn infer_derive_clone_simple() {
|
||||
let (db, pos) = TestDB::with_position(
|
||||
|
|
Loading…
Reference in a new issue