Skip to content

Fix panic with modular-bitfield on nightly#355

Open
cj-matti-niemenmaa wants to merge 1 commit intojam1garner:masterfrom
cj-matti-niemenmaa:fix-multiline-highlighting-crash
Open

Fix panic with modular-bitfield on nightly#355
cj-matti-niemenmaa wants to merge 1 commit intojam1garner:masterfrom
cj-matti-niemenmaa:fix-multiline-highlighting-crash

Conversation

@cj-matti-niemenmaa
Copy link

Only seen on nightly because backtrace/mod.rs only provides non-zero lines and columns with #[cfg(all(feature = "verbose-backtrace", nightly, proc_macro))].

Simply skip the highlighting if the span spans multiple lines, similarly to how multi-line spans are already not supported by Visitor::visit_lit below.

Fixes #354.

Only seen on nightly because `backtrace/mod.rs` only provides non-zero
lines and columns with `#[cfg(all(feature = "verbose-backtrace",
nightly, proc_macro))]`.

Simply skip the highlighting if the span spans multiple lines, similarly
to how multi-line spans are already not supported by
`Visitor::visit_lit` below.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

custom attribute panicked with modular-bitfield on nightly

1 participant