# Rust 1.56.0 및 Rust 2021 발표

> Clean Markdown view of GeekNews topic #5240. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=5240](https://news.hada.io/topic?id=5240)
- GeekNews Markdown: [https://news.hada.io/topic/5240.md](https://news.hada.io/topic/5240.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-10-22T10:25:02+09:00
- Updated: 2021-10-22T10:25:02+09:00
- Original source: [blog.rust-lang.org](https://blog.rust-lang.org/2021/10/21/Rust-1.56.0.html)
- Points: 12
- Comments: 1

## Topic Body

- Rust는 언어가 빠르게 발전하면서도 안정성을 유지할수 있도록 Edition 방식을 채택

ㅤ→ 하위호환이 안되는 기능들을 Opt-in 방식으로 에디션에 추가

- Rust 2021

ㅤ→ Disjoint capture : Closure 가 실제 사용하는 필드만 캡쳐

ㅤ→ IntoIterator for arrays : array.into_iter() 가 레퍼런스 대신 밸류로 iterate

ㅤ→ 매크로에서 OR (|) 사용

ㅤ→ 새 Cargo Feature Resolver (버전 2)가 기본 값

ㅤ→ Prelude(무조건 임포트되는 표준 라이브러리)에 추가 : TryInfo, TryFrom, FromIterator

ㅤ→ Panic macro가 무조건 포맷 스트링을 요구. 마치 println!() 처럼

ㅤ→ ident#, ident"...", ident'...' 가 예약어에 추가

ㅤ→ bare-trait-objects, ellipsis-inclusive-range-patterns 경고를 에러로

- cargo fix 를 통해서 대부분 자동으로 마이그레이션 지원

## Comments



### Comment 7338

- Author: xguru
- Created: 2021-10-22T10:26:01+09:00
- Points: 1

- Rust 2021 Edition 계획 https://news.hada.io/topic?id=4241
