6877240fdf
10563: feat: Make "Generate getter" assist use semantic info r=agluszak a=agluszak This PR makes "Generate getter" assist use semantic info instead of dealing with types encoded as strings. Getters for types which are: - `Copy` no longer return references - `AsRef<str>` (i.e. `String`) return `&str` (instead of `&String`) - `AsRef<[T]>` (i.e. `Vec<T>`) return `&[T]` (instead of `&Vec<T>`) - `AsRef<T>` (i.e. `Box<T>`) return `&T` (instead of `&Box<T>`) - `Option<T>` return `Option<&T>` (instead of `&Option<T>`) - `Result<T, E>` return `Result<&T, &E>` (instead of `&Result<T, E>`) String, Vec, Box and Option were previously handled as special cases. Closes #10295 Co-authored-by: Andrzej Głuszak <gluszak.andrzej@gmail.com> |
||
---|---|---|
.. | ||
src | ||
Cargo.toml |