-
-
Notifications
You must be signed in to change notification settings - Fork 14.9k
std incorrectly states that ? uses Into on the underlying error type #111655
Copy link
Copy link
Closed
Copy link
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsE-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Location
rust/library/core/src/convert/mod.rs
Lines 497 to 499 in b652d9a
Summary
According to the reference and rustc, the
?operator uses theFromtrait on the underlying error.For example (playground),
rustc 1.71.0-nightly (ce5919fce 2023-05-15)If the
Into<B>impl is replaced with aFrom<A>impl, the example will successfully compile.The docs in core/std should no longer state that
?usesInto.