diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-10-20 21:02:46 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-20 21:02:46 +0000 |
| commit | 6877240fdf597533e2d3349454f62fdc40aaae54 (patch) | |
| tree | 40a9803a4080ea144c35c9b550c7c4cb8211bfe7 /tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff | |
| parent | 11326a6847f7fd43afef1806779082f96264d9c6 (diff) | |
| parent | 88e2f0782693b73d71d7bbf13d584c4aa37fd834 (diff) | |
| download | rust-6877240fdf597533e2d3349454f62fdc40aaae54.tar.gz rust-6877240fdf597533e2d3349454f62fdc40aaae54.zip | |
Merge #10563
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>
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_len_raw.NormalizeArrayLen.diff')
0 files changed, 0 insertions, 0 deletions
