Rust 1.56.0 और Rust 2021 की घोषणा
(blog.rust-lang.org)- Rust ने तेज़ी से विकसित होते हुए भी स्थिरता बनाए रखने के लिए Edition तरीका अपनाया है
→ backward compatibility तोड़ने वाले फीचर्स को opt-in तरीके से editions में जोड़ा जाता है
- Rust 2021
→ Disjoint capture : Closure अब केवल उन्हीं fields को capture करता है जिनका वह वास्तव में उपयोग करता है
→ IntoIterator for arrays : array.into_iter() अब reference की बजाय value पर iterate करता है
→ macros में OR (|) का उपयोग
→ नया Cargo Feature Resolver (version 2) अब default है
→ Prelude (वह standard library जो बिना import के उपलब्ध होती है) में जोड़े गए: TryInfo, TryFrom, FromIterator
→ Panic macro अब हमेशा format string मांगता है, ठीक println!() की तरह
→ ident#, ident"...", ident'...' को reserved syntax में जोड़ा गया
→ bare-trait-objects, ellipsis-inclusive-range-patterns warnings अब errors हैं
cargo fixके ज़रिए ज़्यादातर migration अपने-आप support हो जाता है
1 टिप्पणियां