Open
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Description
I'm mainly filing this to be able to close other issues whose problems come down to this. I don't know if we want to fix this or will fix this, but at least there will be a single issue for it.
Reacted by Eyal Kalderon, iamlotus, Iago-lito, John Beutner, Maor Kleinberger, Nils Andre and Lily
Metadata
Metadata
Assignees
Labels
A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.
Activity
Auto merge of #42913 - kennytm:fix-40569-ident-without-backtrack, r=j…
iago-lito commentedon Jun 28, 2019
Is it also a good place to gather resources explaining why it is the case that macros don't backtrack?
I'm not particularly in need of bactracking, but I'm curious why this (no-)feature. I guess it's a limitation due to compiler optimization? Or maybe there are deeper theoretical problems with backtracking?
kmaork commentedon Nov 16, 2020
Is there any progress here?
Until this is solved, is there a recommended workaround for extracting the last element of a repetition?
The best I've got is reversing the whole repetition using a recursive macro and then extracting the first element.