-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
unreachable!("{}") works on Rust 2021 #92137
Copy link
Copy link
Closed
Labels
A-edition-2021Area: The 2021 editionArea: The 2021 editionA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API 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.
Metadata
Metadata
Assignees
Labels
A-edition-2021Area: The 2021 editionArea: The 2021 editionA-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)C-bugCategory: This is a bug.Category: This is a bug.P-highHigh priorityHigh priorityT-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API 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.
The behavior of
unreachabledoes not depend the edition of the crate that invoked the macro. That's fine fortodo!()andunimplemented!()due to the way they are implemented, but in #92068, it was discovered thatunreachable!()behaves subtly different, due to the way it has a special one-argument case. Looks like missed this when working on the 2021 panic macros. :(