mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 11:17:04 +00:00

Simplify `get_trait_ref` fn used for `virtual_function_elimination` 1. The name `get_trait_ref` is misleading, so I renamed it to something more like `expect_...` because it ICEs if used incorrectly. 2. No need to manually go through the existential trait refs, we already have `.principal()` for that.
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.