-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Tracking issue for dyn upcasting coercion #65991
Copy link
Copy link
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`S-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.
Milestone
Metadata
Metadata
Assignees
Labels
A-trait-systemArea: Trait systemArea: Trait systemC-tracking-issueCategory: An issue tracking the progress of sth. like the implementation of an RFCCategory: An issue tracking the progress of sth. like the implementation of an RFCF-trait_upcasting`#![feature(trait_upcasting)]``#![feature(trait_upcasting)]`S-tracking-ready-to-stabilizeStatus: This is ready to stabilize; it may need a stabilization report and a PRStatus: This is ready to stabilize; it may need a stabilization report and a PRT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.T-langRelevant to the language teamRelevant to the language teamT-typesRelevant to the types team, which will review and decide on the PR/issue.Relevant to the types team, which will review and decide on the PR/issue.disposition-mergeThis issue / PR is in PFCP or FCP with a disposition to merge it.This issue / PR is in PFCP or FCP with a disposition to merge it.finished-final-comment-periodThe final comment period is finished for this PR / Issue.The final comment period is finished for this PR / Issue.relnotesMarks issues that should be documented in the release notes of the next release.Marks issues that should be documented in the release notes of the next release.
Type
Fields
Give feedbackNo fields configured for issues without a type.
This is a tracking issue for RFC3324. Corresponding MCP is here.
The feature gate for the issue is
#![feature(trait_upcasting)].STATUS UPDATE
Stabilized in Rust 1.86 via #134367.
About tracking issues
Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.
Steps
Stablize, Stabilize RFC3324 dyn upcasting coercion #118133trait_upcastingfeature #101718feature(trait_upcasting)#134367Previous discussions
dyn Traitvalues rfcs#3324Unresolved Questions
CurrentlyCoerceUnsizedtrait cannot express this case: a smart pointers that wrap a raw pointer and don't guarantee via a custom invariant that it is valid. Maybe a separateCoerceUnsizedUnsafetrait is needed. (see Trait upcasting coercion (part4) #88010 (comment)).Before stabilizing it we should check that libs-api is ok with upcasting for all dyn-allowed traits in the library, since those we can't change.(addressed by Tracking issue for dyn upcasting coercion #65991 (comment))Implementation history
Unsafety checking for raw dyn pointers: Trait upcasting coercion (part4) #88010 (not prefered approach, likely will need to do nothing here, but need a design meeting discussion with lang-team)Solution: https://rust-lang.zulipchat.com/#narrow/stream/326132-t-types.2Fmeetings/topic/meeting.202022-09-02.20planning/near/296826711, Commit to safety rules for dyn trait upcasting #101336deref_into_dyn_supertrait#89460Add trait_upcasting related languages changes reference#1259trait_upcastingfeature #101718