Skip to main content

Rust 1.40.0 Release Notes

// RUST-RELEASE-NOTES — official release note timeline

Rust 1.40.0 공식 release note를 기준으로, 섹션별 앞쪽 항목을 발췌해 변화 흐름을 빠르게 훑을 수 있게 정리했습니다.

범위

  • 대상 릴리즈: Rust 1.40.0
  • 포함된 릴리즈 수: 1개
  • 생성 경로: scripts/bloggen.py rust-release-docs
  • 생성일: 2026-07-08
  • 원문: rust-lang/rust RELEASES.md

읽는 법

  • 이 문서는 해당 Rust 릴리즈 하나만 다룹니다.
  • 섹션별 최대 3개 앞쪽 항목만 발췌했으므로, 세부 API 목록은 원문 링크를 확인하세요.
  • Compatibility Notes는 업그레이드 전 회귀 위험을 확인하는 체크리스트로 보면 됩니다.

타임라인

Rust 1.40.0 (2019-12-19)

  • Language
    • You can now use tuple structs and tuple enum variant's constructors in const contexts. e.g.
    • You can now mark structs, enums, and enum variants with the #[non_exhaustive] attribute to indicate that there may be variants or fields added in the future. For example this requires adding a wild-card branch (_ => {}) to any match statements on a non-exhaustive enum. [(RFC 2008)]
    • You can now use function-like procedural macros in extern blocks and in type positions. e.g. type Generated = macro!();
    • 그 외 2개 항목은 원문 참고
  • Compiler
    • Added tier 3 support* for the thumbv7neon-unknown-linux-musleabihf target.
    • Added tier 3 support for the aarch64-unknown-none-softfloat target.
    • Added tier 3 support for the mips64-unknown-linux-muslabi64, and mips64el-unknown-linux-muslabi64 targets.
  • Libraries
    • The is_power_of_two method on unsigned numeric types is now a const function.
  • Stabilized APIs
    • BTreeMap::get_key_value
    • HashMap::get_key_value
    • Option::as_deref_mut
    • 그 외 18개 항목은 원문 참고
  • Cargo
    • Cargo will now always display warnings, rather than only on fresh builds.
    • Feature flags (except --all-features) passed to a virtual workspace will now produce an error. Previously these flags were ignored.
    • You can now publish dev-dependencies without including a version.
  • Compatibility Notes
    • As previously announced, any previous NLL warnings in the 2015 edition are now hard errors.
    • The include! macro will now warn if it failed to include the entire file. The include! macro unintentionally only includes the first expression in a file, and this can be unintuitive. This will become either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.
    • Using #[inline] on function prototypes and consts now emits a warning under unused_attribute lint. Using #[inline] anywhere else inside traits or extern blocks now correctly emits a hard error.

Sources