This commit is contained in:
Edwin Cheng 2020-03-02 14:05:21 +08:00
parent 1465cc0c4f
commit fe04c28b59

View file

@ -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] #[test]
fn infer_derive_clone_simple() { fn infer_derive_clone_simple() {
let (db, pos) = TestDB::with_position( let (db, pos) = TestDB::with_position(