Avatar for the FuelLabs user
FuelLabs
sway
BlogDocsChangelog

Import indirect trait impls when handling item use statements.

#7347Merged
Comparing
tritao:fix-import-broken
(
070e779
) with
master
(
65d6520
)
CodSpeed Performance Gauge
0%
Untouched
25

Benchmarks

Passed

code_lens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::code_lens
CodSpeed Performance Gauge
+1%
4.9 µs4.8 µs
tokens_for_program
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::tokens_for_program
CodSpeed Performance Gauge
+1%
528.3 µs523.5 µs
traverse
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::traverse
CodSpeed Performance Gauge
+1%
114.4 ms113.6 ms
format
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::format
CodSpeed Performance Gauge
+1%
471.3 ms468.7 ms
build_std_lib_docs
forc-plugins/forc-doc/benches/bench_main.rs::benches::benchmarks::build_std_lib_docs
CodSpeed Performance Gauge
0%
301.5 ms300.2 ms
parent_decl_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::parent_decl_at_position
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
tokens_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::tokens_at_position
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
hover
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::hover
CodSpeed Performance Gauge
0%
1.6 ms1.6 ms
token_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::token_at_position
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
highlight
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::highlight
CodSpeed Performance Gauge
0%
5.4 ms5.4 ms
rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::rename
CodSpeed Performance Gauge
0%
5 ms5 ms
find_all_references
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::find_all_references
CodSpeed Performance Gauge
0%
5 ms5 ms
code_action
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::code_action
CodSpeed Performance Gauge
0%
5 ms5 ms
idents_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::idents_at_position
CodSpeed Performance Gauge
0%
468.7 µs468.5 µs
goto_definition
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::goto_definition
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
completion
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::completion
CodSpeed Performance Gauge
0%
4.9 ms4.9 ms
inlay_hints
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::inlay_hints
CodSpeed Performance Gauge
0%
1.9 ms1.9 ms
document_symbol
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::document_symbol
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
did_change_with_caching
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::did_change_with_caching
CodSpeed Performance Gauge
0%
3.8 ms3.8 ms
tokens_for_file
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks::tokens_for_file
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
semantic_tokens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::semantic_tokens
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
on_enter
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::on_enter
CodSpeed Performance Gauge
-1%
124.4 µs125.2 µs
prepare_rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks::prepare_rename
CodSpeed Performance Gauge
-1%
1.5 ms1.5 ms
open_all_example_workspace_members
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::open_all_example_workspace_members
CodSpeed Performance Gauge
-1%
9.7 s9.8 s
compile
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks::compile
CodSpeed Performance Gauge
-1%
5.4 s5.5 s

Commits

Click on a commit to change the comparison range
Base
master
65d6520
-0.02%
Import indirect trait impls when handling item use statements. This updates `TraitMap::filter_by_type_item_import` to scan the trait map for indirect trait impls with generic types matching any of imported item types. This makes sure cases like an impl of a `StorageKey<T>` work, when importing T from a given scope. Fixes https://github.com/FuelLabs/sway/issues/7330
070e779
29 days ago
by tritao
© 2025 CodSpeed Technology
Home Terms Privacy Docs