release notes
release notes
Published 9/10/2020
MinorContains new featuresr#), e.g. let r#for = true;crate in paths. This allows you to refer to the crate root in the path, e.g. use crate::foo; refers to foo in src/lib.rs.::. 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);.#[used] attribute to static items to prevent the compiler from optimising them away, even if they appear to be unused, e.g. #[used] static FOO: u32 = 1;use syntax. 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.pub, pub(crate)) in macros using the vis specifier.#[attr("true")], and you can now write #[attr(true)].#[panic_handler] attribute.riscv32imc-unknown-none-elf target.aarch64-unknown-netbsd targetThe 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:
cargo run doesn't require specifying a package in workspaces.cargo doc now supports --message-format=json. This is equivalent to calling rustdoc --error-format=json.rustdoc allows you to specify what edition to treat your code as with the --edition option.rustdoc now has the --color (specify whether to output color) and --error-format (specify error format, e.g. json) options.rust-gdbgui script that invokes gdbgui with Rust debug symbols.rustfmt or clippy are now available, e.g. #[rustfmt::skip] will skip formatting the next item.release notes
Published 9/10/2020
MinorContains new featuresr#), e.g. let r#for = true;crate in paths. This allows you to refer to the crate root in the path, e.g. use crate::foo; refers to foo in src/lib.rs.::. 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);.#[used] attribute to static items to prevent the compiler from optimising them away, even if they appear to be unused, e.g. #[used] static FOO: u32 = 1;use syntax. 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.pub, pub(crate)) in macros using the vis specifier.#[attr("true")], and you can now write #[attr(true)].#[panic_handler] attribute.riscv32imc-unknown-none-elf target.aarch64-unknown-netbsd targetThe 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:
cargo run doesn't require specifying a package in workspaces.cargo doc now supports --message-format=json. This is equivalent to calling rustdoc --error-format=json.rustdoc allows you to specify what edition to treat your code as with the --edition option.rustdoc now has the --color (specify whether to output color) and --error-format (specify error format, e.g. json) options.rust-gdbgui script that invokes gdbgui with Rust debug symbols.rustfmt or clippy are now available, e.g. #[rustfmt::skip] will skip formatting the next item.Empowering everyone to build reliable and efficient software.