FuelLabs
sway
BlogDocsChangelog

Trait coherence: disallow inherent impls on external types

#7385Merged
Comparing
tritao:improve-trait-coherence-checks
(
770e69e
) with
master
(
4a44a36
)
CodSpeed Performance Gauge
0%
Untouched
25

Benchmarks

Passed

tokens_for_program
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
+1%
530.7 µs523.6 µs
on_enter
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
+1%
125.1 µs124.3 µs
build_std_lib_docs
forc-plugins/forc-doc/benches/bench_main.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
268.7 ms267.4 ms
did_change_with_caching
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
3.7 ms3.7 ms
document_symbol
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
2.5 ms2.5 ms
semantic_tokens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
2.8 ms2.8 ms
compile
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
4.7 s4.7 s
open_all_example_workspace_members
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
7.8 s7.8 s
format
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
385.7 ms385.5 ms
parent_decl_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
tokens_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
2.6 ms2.6 ms
completion
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
4.6 ms4.6 ms
idents_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
468.8 µs468.9 µs
token_at_position
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
goto_definition
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
hover
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.5 ms1.5 ms
inlay_hints
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.8 ms1.8 ms
code_action
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
highlight
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
5.1 ms5.1 ms
rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
4.8 ms4.8 ms
find_all_references
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
4.7 ms4.8 ms
prepare_rename
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
tokens_for_file
sway-lsp/benches/lsp_benchmarks/token_map.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
1.4 ms1.4 ms
traverse
sway-lsp/benches/lsp_benchmarks/compile.rs::benches::benchmarks
CodSpeed Performance Gauge
0%
111 ms111.6 ms
code_lens
sway-lsp/benches/lsp_benchmarks/requests.rs::benches::benchmarks
CodSpeed Performance Gauge
-1%
4.9 µs5 µs

Commits

Click on a commit to change the comparison range
Base
master
4a44a36
+0.02%
Trait coherence: disallow inherent impls on external types This improves the trait coherence checks for impl self case, and polishes a bit of the wording on the existing diagnostics. * Add CompileError::InherentImplForExternalType and diagnostics. Reason/issue/help now refer to "package" to match coherence scope * Enforce package-level check in impl-self type checking Reject inherent impls for external nominal types (struct/enum) Temporary whitelist: allow inherent impls on std::storage::StorageKey<_> This is a workaround so current code that uses this pattern keeps working.
f85841d
16 days ago
by tritao
+0.01%
Merge branch 'master' into improve-trait-coherence-checks
770e69e
16 days ago
by ironcev
© 2026 CodSpeed Technology
Home Terms Privacy Docs