mutable linear types are modified when I don't think they are (except when in function calls?) [documentation needed, or real bug??] #15269
Labels
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
From here, again: https://github.com/killerswan/ovid/blob/ad2efdabb2eb834ca7a50cbda5806ccd033d6283/CSVProvider.rs
In this,
cx
is a&mut ExtCtxt
, which @brson said was a linear type. There's something special in how these are handled in function arguments, apparently, which allows cx to be used twice here withquote_item!
only when the first is inside a function call. Why? What is going on?If this isn't a bug, do we have it documented somewhere? :D
The text was updated successfully, but these errors were encountered: