diff options
author | Aleksey Kladov <[email protected]> | 2021-01-14 15:25:19 +0000 |
---|---|---|
committer | Aleksey Kladov <[email protected]> | 2021-01-14 15:25:19 +0000 |
commit | 8dc68ecdfcc764c7c0dcf5fcedcb51b092d99620 (patch) | |
tree | f0f93d744416a1114b34472b91574afe3be14147 /crates/syntax | |
parent | 865e05b5b47d3e27e8fe4458662e751e492a0f51 (diff) |
Introduce more appropriate assertion mechanism
rust-analyzer is a long-running program, so we *should* handle assertion
failures.
See also https://www.sqlite.org/assert.html.
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/src/display.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/syntax/src/display.rs b/crates/syntax/src/display.rs index 391647fc6..cd956d950 100644 --- a/crates/syntax/src/display.rs +++ b/crates/syntax/src/display.rs | |||
@@ -80,7 +80,7 @@ pub fn macro_label(node: &ast::Macro) -> String { | |||
80 | let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default(); | 80 | let name = node.name().map(|name| name.syntax().text().to_string()).unwrap_or_default(); |
81 | match node { | 81 | match node { |
82 | ast::Macro::MacroRules(node) => { | 82 | ast::Macro::MacroRules(node) => { |
83 | let vis = if node.has_atom_attr("macro_export") { "#[macro_export]\n" } else { "" }; | 83 | let vis = if node.has_atom_attr("macro_export") { "#[macro_export] " } else { "" }; |
84 | format!("{}macro_rules! {}", vis, name) | 84 | format!("{}macro_rules! {}", vis, name) |
85 | } | 85 | } |
86 | ast::Macro::MacroDef(node) => { | 86 | ast::Macro::MacroDef(node) => { |