You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Nodes inside an f-string hole with escaped quotes carry wrong spans #2270
The two .clone() call nodes inside the hole were reported at line 27, bytes 1021..1032 and 1034..1045, which is text elsewhere in the file. A hole re-parsed after unescaping \" appears to keep offsets relative to the unescaped buffer, not the file.
A diagnostic in a later hole without escapes (f"{\"a\".len()} {nope}") points at the right column, so the shift is confined to nodes inside the hole that contains the escapes.
Expected: every node in a hole maps back to its bytes in the source file (diagnostics, census spans, analyze facts, lldb line info all read these).
Fixed on main by e3b0ad0 (PR #2663, stack #2668; battery green on the stack top 9f92dbb). The commit message names the root-cause line and the regression test.
Activity
D111 sweep: where a .clone() made an owned copy of a view, the annota…
D111 sweep: str .clone() and move removed from test/ and examples/, c…
ehartford commentedon Oct 25, 2026
Triage 2026-10-25,
with v0.15.3.0(main a261b65): reproduced. An error inside a hole after escaped quotes is reported six columns early:The identifier starts at column 41.
pre-release: a misleading diagnostic location in ordinary code; the fix is mapping hole offsets back through the unescape.
Parser: nodes in an f-string hole map back through the stripped escap…
ehartford commentedon Oct 25, 2026
Fixed on main by e3b0ad0 (PR #2663, stack #2668; battery green on the stack top 9f92dbb). The commit message names the root-cause line and the regression test.