You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reacted by Casey Allred, Kroc Camen, Stas Kazhavets, Ross MacArthur, Evgeniy Dushistov, Steven Roose, Mattias Päivärinta, Fabian Freyer, KC, Ondřej Hruška and 3 more
Reacted by Ahmad Rifa'i, Mykhailo Krainik and Felipe S. S. Schneider
Reacted by Iban Eguia Moraza, Fabian Freyer, Clint Frederickson, Ahmad Rifa'i, Mykhailo Krainik and Felipe S. S. Schneider
Reacted by Mykhailo Krainik and Felipe S. S. Schneider
Is there a way to generically print an error with the original value if the conversion fails without requiring Clone so a related method which panics on failure could have nice error messages?
Apologies if this is covered somewhere else, but what would we like to see before marking this as stable? I'm pretty sure I've reimplemented this functionality a few times in various projects, so a common reusable trait would make me 😄
Reacted by Stanislav Tkach, Phil Ruffwind, Nicolas, Evgeniy Dushistov, Alexander Polakov, Richard Dodd, Clément Renault, remexre, Nikolai Vazquez, Daniel P. Clark and 6 more
No, we usually close tracking issue when the stabilization or removal lands in the master branch. After that there is nothing left to track. (Unless a newly-reported bug comes up, but we handle that separately.)
Activity
Rollup merge of rust-lang#33426 - sfackler:try-from, r=aturon
Rollup merge of rust-lang#33426 - sfackler:try-from, r=aturon
Zoxc commentedon May 9, 2016
Is there a way to generically print an error with the original value if the conversion fails without requiring
Cloneso a related method which panics on failure could have nice error messages?chris-morgan commentedon May 10, 2016
A discussion of whether this should go in the prelude is pending for when this goes stable.
shepmaster commentedon Jul 9, 2016
Apologies if this is covered somewhere else, but what would we like to see before marking this as stable? I'm pretty sure I've reimplemented this functionality a few times in various projects, so a common reusable trait would make me 😄
sfackler commentedon Jul 9, 2016
We can bring it up for discussion for the next cycle.
283 remaining items
SimonSapin commentedon Mar 12, 2019
Oh I thought #58015 had landed, but it hasn’t yet… Let’s discuss it there.
Auto merge of #58015 - icefoxen:tryfrom-docs, r=SimonSapin
o01eg commentedon Mar 30, 2019
Could
TryFromtrait have a method to check if argument could be converted without consuming it?Kerollmops commentedon Mar 30, 2019
One way to work with non-consuming impossible conversion could be to return the consumed non-convertible value along with the associated error.
SimonSapin commentedon Apr 9, 2019
Oops this should have been closed by #58302. Closing now.
@o01eg The typical way to do non-consuming conversion is to implement e.g.
TryFrom<&'_ Foo>instead ofTryFrom<Foo>.ErichDonGubler commentedon Apr 9, 2019
Wait...this shouldn't actually close until landing on stable Thursday, right?
sfackler commentedon Apr 9, 2019
No, we close tracking issues when the PR stabilizing the feature lands on master.
SimonSapin commentedon Apr 9, 2019
No, we usually close tracking issue when the stabilization or removal lands in the
masterbranch. After that there is nothing left to track. (Unless a newly-reported bug comes up, but we handle that separately.)jethrogb commentedon Apr 9, 2019
Tracking issues are closed by the PR that stabilizes them. Depending on the release cycle, this could be up to 12 weeks before stable is released.
ErichDonGubler commentedon Apr 9, 2019
Got it. Thanks for the clarification, everyone! :)
shepmaster commentedon Jun 5, 2019
@gregdegruy update your version of Rust to 1.34 or higher.
Merge #327
Add nom [1] dependency
Stabilize the TryFrom and TryInto traits