rust-analyzer/crates/ide-assists/src
Ivar Scholten 4e9d17b96d fix: use Result type aliases in "Wrap return type in Result" assist
This commit makes the "Wrap return type in Result" assist prefer type aliases of standard library
type when the are in scope, use at least one generic parameter, and have the name "Result".

The last restriction was made in an attempt to avoid false assumptions about which type the
user is referring to, but that might be overly strict. We could also do something like this, in
order of priority:

* Use the alias named "Result".
* Use any alias if only a single one is in scope, otherwise:
* Use the standard library type.

This is easy to add if others feel differently that is appropriate, just let me know.
2024-09-02 02:00:19 +02:00
..
handlers fix: use Result type aliases in "Wrap return type in Result" assist 2024-09-02 02:00:19 +02:00
tests Update generated doctests 2024-08-31 10:17:37 +01:00
utils Properly account for editions in names 2024-08-16 16:46:24 +03:00
assist_config.rs Simplify 2024-07-22 09:54:31 +02:00
assist_context.rs Encode edition within FileId in the hir layer 2024-07-18 08:49:10 +02:00
lib.rs Add explicit enum discriminant assist 2024-08-31 10:17:37 +01:00
tests.rs Simplify FileDelegate 2024-08-05 13:03:03 +02:00
utils.rs Properly account for editions in names 2024-08-16 16:46:24 +03:00