Open Mersid opened 1 year ago
Thanks for the report! One more simple example:
macro_rules! as_is {
($($t:tt)*) => { $($t)* };
}
fn main() {
as_is! {
// a \
struct Sssss;
/// hello \
struct Hello;
}
let v = Hello{}; // <- Hello is unresolved
let g = Sssss{}; // <- ok
}
Macros that take structs don't show up properly if documentation in it ends with a backslash. For example, observe these two instances. They work fine normally But when adding backslashes to the comment (and it only works with triple slash comments that end with a backslash), The coloring gets stripped out, showing that the IDE is no longer able to properly recognize the code. I am not quite sure why this is happening, but it does mean that these types do not show up in code completion. An example is from the wgpu crate: the functions in wgpu::Features::* do not work because two of the bit flags end with a backslash in its comment.
Originally posted by @Mersid in https://github.com/intellij-rust/intellij-rust/issues/6908#issuecomment-1357044518