Email me

Rust versions / 1.30

Rust release · Oct 25, 2018

Rust 1.30: what's new, what was stabilized

Short answerRust 1.30 was released on Oct 25, 2018: 10 newly stable APIs (Ipv4Addr::BROADCAST, Ipv4Addr::LOCALHOST, Ipv4Addr::UNSPECIFIED, Ipv6Addr::LOCALHOST, ...). Point release: 1.30.1 (Nov 8, 2018).

Oct 25, 2018release date
0language stabilizations
10APIs stabilized
-new edition

← Rust 1.29All versionsRust 1.31 →

10 APIs stabilized

Ipv4Addr::BROADCAST, Ipv4Addr::LOCALHOST, Ipv4Addr::UNSPECIFIED, Ipv6Addr::LOCALHOST, Ipv6Addr::UNSPECIFIED, Iterator::find_map, str::trim_end_matches, str::trim_end, str::trim_start_matches, str::trim_start

Can it break my build?

No compatibility notes were listed for this release.

Use it

rustup update stable        # get the newest release
rustup install 1.30          # or exactly this one
rustup override set 1.30     # pin a project to it

To require at least this version from users of your crate, set rust-version = "1.30" under [package] in Cargo.toml. Cargo then refuses to build it on older compilers with a clear message, and with resolver 3 (the default on the 2024 edition, Rust 1.85+) it also prefers dependency versions that support it.

Full release notes

Language

  • [Procedural macros are now available.][52081] These kinds of macros allow for more powerful code generation. There is a [new chapter available][proc-macros] in the Rust Programming Language book that goes further in depth.
  • [You can now use keywords as identifiers using the raw identifiers syntax (r#),][53236] e.g. let r#for = true;
  • [Using anonymous parameters in traits is now deprecated with a warning and will be a hard error in the 2018 edition.][53272]
  • [You can now use crate in paths.][54404] This allows you to refer to the crate root in the path, e.g. use crate::foo; refers to foo in src/lib.rs.
  • [Using a external crate no longer requires being prefixed with ::.][54404] Previously, using a external crate in a module without a use statement required let json = ::serde_json::from_str(foo); but can now be written as let json = serde_json::from_str(foo);.
  • [You can now apply the #[used] attribute to static items to prevent the compiler from optimising them away, even if they appear to be unused,][51363] e.g. #[used] static FOO: u32 = 1;
  • [You can now import and reexport macros from other crates with the use syntax.][50911] Macros exported with #[macro_export] are now placed into the root module of the crate. If your macro relies on calling other local macros, it is recommended to export with the #[macro_export(local_inner_macros)] attribute so users won't have to import those macros.
  • [You can now catch visibility keywords (e.g. pub, pub(crate)) in macros using the vis specifier.][53370]
  • [Non-macro attributes now allow all forms of literals, not just strings.][53044] Previously, you would write #[attr("true")], and you can now write #[attr(true)].
  • [You can now specify a function to handle a panic in the Rust runtime with the #[panic_handler] attribute.][51366]

Compiler

  • [Added the riscv32imc-unknown-none-elf target.][53822]
  • [Added the aarch64-unknown-netbsd target][53165]
  • [Upgraded to LLVM 8.][53611]

Libraries

  • [ManuallyDrop now allows the inner type to be unsized.][53033]

Stabilized APIs

  • [Ipv4Addr::BROADCAST]
  • [Ipv4Addr::LOCALHOST]
  • [Ipv4Addr::UNSPECIFIED]
  • [Ipv6Addr::LOCALHOST]
  • [Ipv6Addr::UNSPECIFIED]
  • [Iterator::find_map]

The following methods are replacement methods for trim_left, trim_right, trim_left_matches, and trim_right_matches, which will be deprecated in 1.33.0:

  • [str::trim_end_matches]
  • [str::trim_end]
  • [str::trim_start_matches]
  • [str::trim_start]

Cargo

  • [cargo run doesn't require specifying a package in workspaces.][cargo/5877]
  • [cargo doc now supports --message-format=json.][cargo/5878] This is equivalent to calling rustdoc --error-format=json.
  • [Cargo will now provide a progress bar for builds.][cargo/5995]

Misc

1.30.1 (Nov 8, 2018)

Release notes from the Rust project's RELEASES.md (MIT or Apache-2.0); summaries above are ours.

← Rust 1.29All versionsRust 1.31 →

Up next

Next releaseRust 1.31Released Dec 6, 2018.Read it next →

Did this answer your question?

Get the receipts by email.

What my AI agents tried this week, with the real numbers: what worked, what flopped, what made money. One email when there is something worth reading.

No spam, never sold. Every email has a one-click unsubscribe.

Popular in the shop

All 124 tools →

Browse: Bundles and kitsHome, family and schoolMoney and businessAI toolsSports and fitnessMaking and hobbiesFood and drinkIndie dev and launchTrading and quant

Free: Landing page teardown iPhone app cost calculator LLM API cost calculator Paid online: $49 Launch Check App builds Articles FAQ