mirror of
https://github.com/rust-lang/rust.git
synced 2025-11-24 02:36:59 +00:00
Limit impl_trait_header query to only trait impls Changes `impl_trait_header` to panic on inherent impls intstead of returning None. A few downstream functions are split into option and non-option returning functions. This gets rid of a lot of unwraps where we know we have a trait impl, while there are still some cases where the Option is helpful. Summary of changes to tcx methods: * `impl_is_of_trait` (new) * `impl_trait_header` -> `impl_trait_header`/`impl_opt_trait_header` * `impl_trait_ref` -> `impl_trait_ref`/`impl_opt_trait_ref` * `trait_id_of_impl` -> `impl_trait_id`/`impl_opt_trait_id`