diff options
| author | bors <bors@rust-lang.org> | 2022-11-07 11:07:12 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-11-07 11:07:12 +0000 |
| commit | d3d380656555302fba8b9ba7b3d9a8c7a89d314f (patch) | |
| tree | 4527812df7a8c510b8883c35f3aeb66eeba1c40e /tests/debuginfo/enum-thinlto.rs | |
| parent | 364820a296a22e46827621eb861c69d748640ecc (diff) | |
| parent | f24fbc20274962860e15e1160bfdaade543092bf (diff) | |
| download | rust-d3d380656555302fba8b9ba7b3d9a8c7a89d314f.tar.gz rust-d3d380656555302fba8b9ba7b3d9a8c7a89d314f.zip | |
Auto merge of #12991 - TiddoLangerak:extract-method-from-trait-into-impl-root, r=Veykril
Feat: extracted method from trait impl is placed in existing impl **Before** https://user-images.githubusercontent.com/1759192/183872883-3b0eafd2-d1dc-440e-9e66-38e3372f8b64.mp4 **After** https://user-images.githubusercontent.com/1759192/183875769-87f34c7d-52f0-4dfc-9766-f591ee738ebb.mp4 Previously, when triggering a method extraction from within an impl trait block, then this would always create a new impl block for the struct, even if there already is one. Now, if there is already an existing trait-less impl block, then it'll put the extracted method in there. **Caveats**: - It currently requires the target impl block to be non-empty. This limitation is because the current architecture takes a `node_to_insert_after` as reference for where to insert the extracted function. An empty impl block doesn't have such a reference node, since it's empty. It seems that supporting this requires a much larger and more complex change. - This is my first contribution in rust, so apologies for any beginner mistakes.
Diffstat (limited to 'tests/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions
