mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 06:11:35 +00:00
Less hacky assert!
expansion
This commit is contained in:
parent
368c5f6023
commit
b8437f71b6
3 changed files with 31 additions and 15 deletions
|
@ -469,7 +469,10 @@ mod panic {
|
|||
}
|
||||
|
||||
#[rustc_builtin_macro(std_panic)]
|
||||
#[macro_export]
|
||||
macro_rules! panic {}
|
||||
#[rustc_builtin_macro]
|
||||
macro_rules! assert {}
|
||||
|
||||
fn main() {
|
||||
// from https://doc.rust-lang.org/std/fmt/index.html
|
||||
|
@ -522,6 +525,8 @@ fn main() {
|
|||
println!("{:x?} {} ", thingy, n2);
|
||||
panic!("{}", 0);
|
||||
panic!("more {}", 1);
|
||||
assert!(true, "{}", 1);
|
||||
assert!(true, "{} asdasd", 1);
|
||||
}"#
|
||||
.trim(),
|
||||
expect_file!["./test_data/highlight_strings.html"],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue