Commit 05fa82b
committed
Fix misleading Lifetime diagnostics for inout parameters
Correctly diagnose this as:
"invalid use of inout dependence on the same inout parameter
@_lifetime(a: &a)
func f_inout_useless(a: inout MutableRawSpan) {}
Correctly diagnose this as:
"lifetime-dependent parameter must be 'inout'":
@_lifetime(a: borrow a)
func f_inout_useless(a: borrowing MutableRawSpan) {}1 parent df0b81c commit 05fa82b
File tree
3 files changed
+3
-2
lines changed- include/swift/AST
- lib/AST
- test/Sema
3 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8324 | 8324 | | |
8325 | 8325 | | |
8326 | 8326 | | |
8327 | | - | |
| 8327 | + | |
8328 | 8328 | | |
8329 | 8329 | | |
8330 | 8330 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
917 | 917 | | |
918 | 918 | | |
919 | 919 | | |
| 920 | + | |
920 | 921 | | |
921 | 922 | | |
922 | 923 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
568 | | - | |
| 568 | + | |
569 | 569 | | |
570 | 570 | | |
571 | 571 | | |
| |||
0 commit comments