mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-21 03:57:38 +00:00
![]() Don't assume traits used as type are trait objs in 2021 edition Fixes #127548 When you use a trait as a type, the compiler automatically assumes you meant to use a trait object, which is not always the case. This PR fixes the bug where you don't need a trait object, so the error message was changed to: ``` error[E0782]: expected a type, found a trait ``` Also fixes some ICEs: Fixes https://github.com/rust-lang/rust/issues/120241 Fixes https://github.com/rust-lang/rust/issues/120482 Fixes https://github.com/rust-lang/rust/issues/125512 |
||
---|---|---|
.. | ||
check | ||
coherence | ||
collect | ||
errors | ||
hir_ty_lowering | ||
impl_wf_check | ||
outlives | ||
variance | ||
autoderef.rs | ||
bounds.rs | ||
check_unused.rs | ||
collect.rs | ||
constrained_generic_params.rs | ||
delegation.rs | ||
errors.rs | ||
hir_wf_check.rs | ||
impl_wf_check.rs | ||
lib.rs |