Skip to content

Extract into variables: overlapping ranges not permitted #16539

@Veykril

Description

@Veykril
fn expander_to_proc_macro(
    expander: proc_macro_api::ProcMacro,
    ignored_macros: &[Box<str>],
) -> ProcMacro {
    let name = From::from(expander.name());
    let kind = match expander.kind() {
        proc_macro_api::ProcMacroKind::CustomDerive => ProcMacroKind::CustomDerive,
        proc_macro_api::ProcMacroKind::FuncLike => ProcMacroKind::FuncLike,
        proc_macro_api::ProcMacroKind::Attr => ProcMacroKind::Attr,
    };
    ProcMacro {
        name,
        kind,
        expander: sync::Arc::new(Expander(expander)),
        disabled: $0ignored_macros.iter().any(|replace| **replace == name)$0,
    }
}

Invoking Extract into variables on that range here errors with overlapping ranges not permitted. I've been running into this quite frequently recently.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions