Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Fixes `for` specific error message.

#6758Merged
Comparing
esdrubal/6395
(
0806797
) with
master
(
a02e8ea
)
CodSpeed Performance Gauge
0%
Improvements
0
Regressions
0
Untouched
22
New
0
Dropped
0
Ignored
0

Benchmarks

Passed

hover
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::hover
CodSpeed Performance Gauge
0%
1.8 ms
1.8 ms
idents_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::idents_at_position
CodSpeed Performance Gauge
0%
482.7 µs
481.7 µs
on_enter
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::on_enter
CodSpeed Performance Gauge
0%
126.4 µs
126.1 µs
traverse
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::traverse
CodSpeed Performance Gauge
0%
212.6 ms
212.2 ms
prepare_rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::prepare_rename
CodSpeed Performance Gauge
0%
1.7 ms
1.7 ms
completion
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::completion
CodSpeed Performance Gauge
0%
21 ms
21 ms
parent_decl_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::parent_decl_at_position
CodSpeed Performance Gauge
0%
18.7 ms
18.7 ms
highlight
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::highlight
CodSpeed Performance Gauge
0%
44.1 ms
44.1 ms
inlay_hints
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::inlay_hints
CodSpeed Performance Gauge
0%
18.6 ms
18.6 ms
rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::rename
CodSpeed Performance Gauge
0%
46.6 ms
46.6 ms
find_all_references
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::find_all_references
CodSpeed Performance Gauge
0%
46.6 ms
46.6 ms
tokens_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::tokens_at_position
CodSpeed Performance Gauge
0%
18.7 ms
18.7 ms
code_action
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::code_action
CodSpeed Performance Gauge
0%
25.9 ms
25.9 ms
goto_definition
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::goto_definition
CodSpeed Performance Gauge
0%
1.7 ms
1.7 ms
did_change_with_caching
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::did_change_with_caching
CodSpeed Performance Gauge
0%
505.6 ms
507.1 ms
token_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::token_at_position
CodSpeed Performance Gauge
0%
1.7 ms
1.7 ms
compile
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::compile
CodSpeed Performance Gauge
0%
5.4 s
5.5 s
tokens_for_file
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::tokens_for_file
CodSpeed Performance Gauge
0%
1.7 ms
1.7 ms
code_lens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::code_lens
CodSpeed Performance Gauge
-1%
5.3 µs
5.3 µs
format
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::format
CodSpeed Performance Gauge
-1%
462.5 ms
467.7 ms
semantic_tokens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::semantic_tokens
CodSpeed Performance Gauge
-3%
3.1 ms
3.2 ms
document_symbol
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::document_symbol
CodSpeed Performance Gauge
-3%
5.3 ms
5.5 ms

Commits

Click on a commit to change the comparison range
Base
master
a02e8ea
0%
Fixes for specific error message. The added test case was emitting a wrong/confusing error message, because a for loop only gets type-checked in its desugared form, as a while loop. The error message was `A while loop's loop body cannot implicitly return a value. Try assigning it to a mutable variable declared outside of the loop instead.` Corrected to: `A for loop's loop body cannot implicitly return a value. Try assigning it to a mutable variable declared outside of the loop instead.`
f4d9fba
7 months ago
by esdrubal
-1%
Merge branch 'master' into esdrubal/6395
0806797
7 months ago
by IGI-111
© 2025 CodSpeed Technology
Home Terms Privacy Docs