Closed
Description
I tried the example of compiler plugin and added only the nll feature.
The result is an ICE:
error: internal compiler error: broken MIR in NodeId(186) (Terminator { source_info: SourceInfo { span: src/lib.rs:60:5: 60:40, scope: scope[0] }, kind: _2 = const rustc_plugin::Registry::register_macro(move _3, move _4, move _6) -> [return: bb2, unwind: bb1] }): bad arg #2 (for<'cx, 'r, 's> fn(&'cx mut syntax::ext::base::ExtCtxt<'r>, syntax::codemap::Span, &'s [syntax::tokenstream::TokenTree]) -> std::boxed::Box<syntax::ext::base::MacResult + 'cx> <- for<'r, 's, 't0> fn(&'r mut syntax::ext::base::ExtCtxt<'s>, syntax::codemap::Span, &'t0 [syntax::tokenstream::TokenTree]) -> std::boxed::Box<syntax::ext::base::MacResult>): RegionsOverlyPolymorphic(BrNamed(crate11:DefIndex(1:1022), 'cx), '_#17r)
--> src/lib.rs:60:30
|
60 | reg.register_macro("rn", expand_rn);
| ^^^^^^^^^
error: internal compiler error: broken MIR in NodeId(186) (Terminator { source_info: SourceInfo { span: src/lib.rs:60:5: 60:40, scope: scope[0] }, kind: _2 = const rustc_plugin::Registry::register_macro(move _3, move _4, move _6) -> [return: bb2, unwind: bb1] }): bad arg #2 (for<'cx, 'r, 's> fn(&'cx mut syntax::ext::base::ExtCtxt<'r>, syntax::codemap::Span, &'s [syntax::tokenstream::TokenTree]) -> std::boxed::Box<syntax::ext::base::MacResult + 'cx> <- for<'r, 's, 't0> fn(&'r mut syntax::ext::base::ExtCtxt<'s>, syntax::codemap::Span, &'t0 [syntax::tokenstream::TokenTree]) -> std::boxed::Box<syntax::ext::base::MacResult>): RegionsOverlyPolymorphic(BrNamed(crate11:DefIndex(1:1022), 'cx), '_#17r)
--> src/lib.rs:60:30
|
60 | reg.register_macro("rn", expand_rn);
| ^^^^^^^^^
Metadata
Metadata
Assignees
Labels
Area: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlArea: Non-lexical lifetimes (NLL)Area: compiler plugins, doc.rust-lang.org/nightly/unstable-book/language-features/plugin.htmlCategory: This is a bug.Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Working towards the "valid code works" goalRelevant to the compiler team, which will review and decide on the PR/issue.