bors 399b068235 Auto merge of #113856 - WaffleLapkin:vtablin', r=oli-obk
Refactor vtable encoding and optimize it for the case of multiple marker traits

This PR does two things
- Refactor `prepare_vtable_segments` (this was motivated by the other change, `prepare_vtable_segments` was quite hard to understand and while trying to edit it I've refactored it)
  - Mostly remove `loop`s labeled `break`s/`continue`s whenever there is a simpler solution
  - Also use `?`
- Make vtable format a bit more efficient wrt to marker traits
  - See the tests for an example

Fixes https://github.com/rust-lang/rust/issues/113840
cc `@crlf0710`

----

Review wise it's probably best to review each commit individually, as then it's more clear why the refactoring is correct.

I can split the last two commits (which change behavior) into a separate PR if it makes reviewing easier
2023-07-20 20:34:06 +00:00
..
2023-07-20 12:01:34 +02:00
2023-05-19 10:44:38 +02:00
2023-06-19 15:39:55 +02:00
2023-06-19 15:39:55 +02:00
2023-05-19 10:44:38 +02:00
2023-04-03 09:24:11 +02:00
2023-04-25 19:53:09 +00:00
2023-05-12 00:10:52 +00:00
2023-05-12 00:10:52 +00:00
2023-04-20 15:06:17 -03:00
2023-04-20 15:06:17 -03:00
2023-05-12 00:10:52 +00:00
2023-05-12 00:10:52 +00:00
2023-06-19 15:39:55 +02:00
2023-05-12 00:10:52 +00:00
2023-04-27 17:18:11 +00:00