mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-29 10:13:54 +00:00
Add test
This commit is contained in:
parent
1465cc0c4f
commit
fe04c28b59
@ -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 New Issue
Block a user