Open
Description
Summary
I've done a git bisect
and both bugs exist long before the Tree-House migration, so I suspect the problem lies in TS-Rs grammar
Reproduction Steps
I tried this:
hx tmp.rs
- Paste this into the buffer:
// this is needed for repro
fn f(){}
// prepending `pub` fixes the HL of the next `pub`
macro _const_assert {
($condition: expr, $const_msg:literal, $runtime_msg:literal, $($arg:tt)*) => {{
if !$crate::intrinsics::likely($condition) {
$crate::panic::const_panic!($const_msg, $runtime_msg, $($arg)*)
}
}}
} //`;` // fixes the HL of the lone `///`
// only if the previous `macro` has `pub` as well
/// A version of `assert` that prints a non-formatting message in const contexts.
///
/// See [`const_panic!`].
#[doc(hidden)] // attributes are needed to repro `pub` bug
pub macro const_assert {
($condition: expr, $const_msg:literal, $runtime_msg:literal, $($arg:tt)*) => {{
if !$crate::intrinsics::likely($condition) {
$crate::panic::const_panic!($const_msg, $runtime_msg, $($arg)*)
}
}}
}
I expected this to happen: pub
is keyword
; ///
is comment
.
Instead, this happened: pub
is variable
; ///
is operator
.
Helix log
~/.cache/helix/helix.log
Platform
Linux
Terminal Emulator
irrelevant
Installation Method
source
Helix Version
unknown