1
Fork 0

Auto merge of #118133 - Urgau:stabilize_trait_upcasting, r=WaffleLapkin

Stabilize RFC3324 dyn upcasting coercion

This PR stabilize the `trait_upcasting` feature, aka https://github.com/rust-lang/rfcs/pull/3324.

The FCP was completed here: https://github.com/rust-lang/rust/issues/65991#issuecomment-1817552398.

~~And also remove the `deref_into_dyn_supertrait` lint which is now handled by dyn upcasting coercion.~~

Heavily inspired by https://github.com/rust-lang/rust/pull/101718
Fixes https://github.com/rust-lang/rust/issues/65991
This commit is contained in:
bors 2023-11-22 16:15:34 +00:00
commit 6d2b84b3ed
69 changed files with 107 additions and 357 deletions

View file

@ -490,8 +490,9 @@ lint_requested_level = requested on the command line with `{$level} {$lint_name}
lint_span_use_eq_ctxt = use `.eq_ctxt()` instead of `.ctxt() == .ctxt()`
lint_supertrait_as_deref_target = `{$t}` implements `Deref` with supertrait `{$target_principal}` as target
.label = target type is set here
lint_supertrait_as_deref_target = this `Deref` implementation is covered by an implicit supertrait coercion
.help = consider removing this implementation or replacing it with a method instead
.label = target type is a supertrait of `{$t}`
lint_suspicious_double_ref_clone =
using `.clone()` on a double reference, which returns `{$ty}` instead of cloning the inner type