feat: match guards, HOF inference, ownership C.2/C.3, LSP sema hover
Sessions 18–23 quality work: - B.3c match arm guards + sequential found-flag lower (bootstrap + selfhost) - Generic HOF type inference (Array/Iter map/filter/fold without type args) - Pattern binding shadowing via unique C locals (__pN_src) - Ownership C.2 exclusive &mut data-flow + C.4 goldens; *p= store-through fix - Ownership C.3 auto-drop on early return/branches: scoped defers, move-on-return, Drop monomorphization, materialize return before Drop - LSP 0.3.0: hover from real sema types - Examples and QUALITY_PLAN session log; selfhost-loop identical
This commit is contained in:
+5
-1
@@ -180,6 +180,8 @@ proc underlineLength(lineText: string, col: uint32, message: string): int =
|
||||
proc hintForMessage(msg: string): string =
|
||||
## Actionable help text for common compiler errors.
|
||||
let m = msg.toLowerAscii()
|
||||
if "while it is mutably borrowed" in m:
|
||||
return "only one active '&mut' borrow is allowed at a time; end the borrow before reuse"
|
||||
if "cannot assign" in m:
|
||||
return "ensure the right-hand side type matches the left-hand side"
|
||||
if "undeclared identifier" in m:
|
||||
@@ -193,7 +195,9 @@ proc hintForMessage(msg: string): string =
|
||||
if "shared reference" in m or "checked function" in m:
|
||||
return "use '&mut T' for mutation, or drop @[Checked] for unchecked code"
|
||||
if "double mutable borrow" in m or "already mutably borrowed" in m:
|
||||
return "only one active '&mut' borrow is allowed at a time"
|
||||
return "only one active '&mut' borrow is allowed at a time; end the borrow before reuse"
|
||||
if "shared-borrow" in m or "shared-borrowed" in m:
|
||||
return "exclusive '&mut' and shared '&' cannot overlap on the same variable"
|
||||
if "expected expression" in m:
|
||||
return "the previous statement may be incomplete (missing value or ';')"
|
||||
if "expected type" in m:
|
||||
|
||||
Reference in New Issue
Block a user