summaryrefslogtreecommitdiff
path: root/lang/rust
AgeCommit message (Collapse)AuthorFilesLines
2018-12-08Update to 1.31.0ryoon2-151/+122
Changelog: Version 1.31.0 (2018-12-06) Language This version marks the release of the 2018 edition of Rust. New lifetime elision rules now allow for eliding lifetimes in functions and impl headers. E.g. impl<'a> Reader for BufReader<'a> {} can now be impl Reader for BufReader<'_> {}. Lifetimes are still required to be defined in structs. You can now define and use const functions. These are currently a strict minimal subset of the const fn RFC. Refer to the language reference for what exactly is available. You can now use tool lints, which allow you to scope lints from external tools using attributes. E.g. #[allow(clippy::filter_map)]. #[no_mangle] and #[export_name] attributes can now be located anywhere in a crate, not just in exported functions. You can now use parentheses in pattern matches. Compiler Updated musl to 1.1.20 Libraries You can now convert num::NonZero* types to their raw equivalvents using the From trait. E.g. u8 now implements From<NonZeroU8>. You can now convert a &Option<T> into Option<&T> and &mut Option<T> into Option<&mut T> using the From trait. You can now multiply (*) a time::Duration by a u32. Stabilized APIs slice::align_to sl ice::align_to_mut slice::chunks_exact slice::chunks_exact_mut slice::rchunks slice::rchunks_mut slice::rchunks_exact slice::rchunks_exact_mut Option::replace Cargo Cargo will now download crates in parallel using HTTP/2. You can now rename packages in your Cargo.toml We have a guide on how to use the package key in your dependencies.
2018-11-29rust: Ensure the bundled http-parser is used.jperkin1-5/+10
Trying to mix and match pkgsrc and bundled dependencies resulted in conflicts between libgit and http-parser, such that cargo was unable to fetch indexes from crates.io with spurious network error regarding Content-Type headers. While here add a note about why these dependencies are currently disabled. Bump PKGREVISION.
2018-11-27rust: speed-up building; clean-upsadam9-42/+132
- use 'build' target for building, not 'dist' - set jobs also for install target - do not generate tarballs; we don't need them, but they take a lot of disk-space - do not install 'src' - do not generate 'install.log' nor 'uninstall.sh' - on Darwin, use headerpad_max_install_names to be able to fix all dylibs - make optimized bootstrap - pkglint fixes - get ready to depend on lang/llvm and devel/jemalloc
2018-11-27Replace, not append to WRKSRC/.cargo/config.maya1-2/+2
This may cause problems if there's already one. Needed by rust librsvg. Tested all cargo.mk users in pkgsrc.
2018-11-18Update to 1.30.1ryoon2-8/+7
Changelog: Version 1.30.1 (2018-11-08) Fixed overflow ICE in rustdoc Cap Cargo progress bar width at 60 in MSYS terminals
2018-10-31Add patch from jakllsch (not merged upstream yet) to fix some pthread/martin2-1/+139
mutex types for some NetBSD architectures.
2018-10-31lang/rust: Various fixes.jperkin3-3/+26
SunOS now needs -D_POSIX_PTHREAD_SEMANTICS and a patch to the rand module to work around getrandom() system call failures. Add -j argument to x.py for the number of make jobs.
2018-10-29Upgrade rust to version 1.30.0.he6-99/+182
Upstream changes: Language * Procedural macros are now available. These kinds of macros allow for more powerful code generation. There is a new chapter available in the Rust Programming Language book that goes further in depth. * You can now use keywords as identifiers using the raw identifiers syntax (r#), 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. * You can now use 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. * Using a external crate no longer requires being prefixed with ::. 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, e.g. #[used] static FOO: u32 = 1; * You can now import and reexport macros from other crates with the 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. * You can now catch visibility keywords (e.g. pub, pub(crate)) in macros using the vis specifier. * Non-macro attributes now allow all forms of literals, not just strings. 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. Compiler * Added the riscv32imc-unknown-none-elf target. * Added the aarch64-unknown-netbsd target Libraries * ManuallyDrop now allows the inner type to be unsized. 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 doc now supports --message-format=json. This is equivalent to calling rustdoc --error-format=json. * Cargo will now provide a progress bar for builds. Misc * 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. * We now distribute a rust-gdbgui script that invokes gdbgui with Rust debug symbols. * Attributes from Rust tools such as rustfmt or clippy are now available, e.g. #[rustfmt::skip] will skip formatting the next item. Pkgsrc changest: * Explicitly list bootstrap kit version number for each kit we carry, so that one entry's version doesn't "bleed into" following kits. * Tweak for handling "earmv7hf" CPU type for NetBSD in the bootstrap.py script * Add two patches from Debian for sparc64; rust would generate code generating unaligned accesses, causing SIGBUS on sparc64 * Update most of the bootstrap kits to version 1.29.2; need minimum 1.29.0 to build 1.30.0. * Rust regrettably doesn't build for powerpc or earmv7hf in this version, most probably due to "char" being "unsigned char" on these platforms. Ref. https://github.com/rust-lang/rust/issues/55465
2018-10-28Upgrade rust to version 1.29.2.he4-64/+61
Upstream changes: * Workaround for an aliasing-related LLVM bug, which caused miscompilation. * The rls-preview component on the windows-gnu targets has been restored. Pkgsrc changes: * More commented-out settings for cross builds on NetBSD. * Bump bootstrap kit versions to 1.29.2 for powerpc, sparc64 and earm7hf. Anyone up for testing for earm7hf? * Because the built-in versions of libgit2, libssh2 and curl can no longer be built with the pkgsrc-provided headers for those packages (due to version skew; the built-in versions have been updated to un-released newer code), the buildlink3.mk files for those packages have been commented out. * Similarly, to avoid using the native pkgsrc host's headers when cross- building, the gcc-wrap script has been adjusted to also re-point /usr/pkg/include into the destination's root (where those above pacakges are not to be installed). * Also have the gcc-wrap script deal with "-I dir" style directives, and re-point these also into the destination's root. * One patch has been integrated upstream, so removed here.
2018-10-23lang/rust: Extract .cargo without making a copy in ${WRKDIR}minskim1-3/+3
2018-10-18Make a tentative fix for pkg/53671 by placing the cross compilerhe1-11/+16
wrapper scripts in ${WRKDIR}/scripts instead of modifying the files/ directory, which conflicts with a read-only pkgsrc.
2018-10-18Fix ${WRKDIR} reference, hint from leotmartin1-2/+2
2018-10-17*: Replace custom tool setup with new ggrep.jperkin1-4/+2
2018-10-15Add pointers to (so far untested) bootstrap kits for sparc64 and earmv7hf.he3-43/+132
Prepare wrapper script handling for use of clang (not yet fully verified). Adjust the cross-compiler wrapper script to improve the handling when used as the linker: * Insert "linker tweaks" before first -L or -l * Handle "-L arg" style as well as "-Larg" * Add "-Wl,-rpath-link" to the linker tweaks just to be sure... Bump PKGREVISION.
2018-10-13Hm, we need to ensure the gcc-wrap script is executable.he1-1/+2
2018-10-13Typo fix, CROSS_TARGET -> GNU_CROSS_TARGET.he1-2/+2
2018-10-13Add the bits required to build rust on NetBSD/powerpc ports, andhe5-7/+239
point to the bootstrap kit for NetBSD/powerpc I'm hosting at the moment. Also add the bits I used when cross-building the NetBSD/powerpc rust on amd64, commented out, as well as the gcc / c++ wrapper script I used in the process. The changes affecting other ports are: * We now add LD_LIBRARY_PATH in the make environment, so that if the bootstrap kit binaries and shared libraries don't have the $ORIGIN-style RPATH entries, it will still work * The bootstrap.py script has been changed to turn off the generation of debuginfo in "RUSTFLAGS"; for some so far unknown reason, the NetBSD/powerpc rust will not build if you ask for debug info. This could perhaps have been made OS-variant dependent, but isn't at the moment. So .. bump PKGREVISION.
2018-10-09My website URI for bootsrap kit has changed. The older website will provideryoon1-3/+3
older taballs, however new tarballs will be provided at the newer website only.
2018-10-07Try to fix "warning: duplicate script for target "pre-build" ignored"ryoon1-3/+12
2018-09-30lang/rust: Fix distfile checksum of Darwin-i386minskim1-5/+5
Noted by jperkin@.
2018-09-30rust-bin: Update to 1.29.1minskim2-14/+14
The standard library's str::repeat function contained an out of bounds write caused by an integer overflow. This has been fixed by deterministically panicking when an overflow happens.
2018-09-24lang/rust: Make llvm build on Darwinminskim2-3/+13
Patch from lang/llvm.
2018-09-21lang/rust: Move common BUILD_DEPENDS in rust packages to cargo.mkminskim1-1/+3
2018-09-14rust: Update to 1.29.0.jperkin7-90/+101
Version 1.29.0 (2018-09-13) ========================== Compiler -------- - [Bumped minimum LLVM version to 5.0.][51899] - [Added `powerpc64le-unknown-linux-musl` target.][51619] - [Added `aarch64-unknown-hermit` and `x86_64-unknown-hermit` targets.][52861] Libraries --------- - [`Once::call_once` now no longer requires `Once` to be `'static`.][52239] - [`BuildHasherDefault` now implements `PartialEq` and `Eq`.][52402] - [`Box<CStr>`, `Box<OsStr>`, and `Box<Path>` now implement `Clone`.][51912] - [Implemented `PartialEq<&str>` for `OsString` and `PartialEq<OsString>` for `&str`.][51178] - [`Cell<T>` now allows `T` to be unsized.][50494] - [`SocketAddr` is now stable on Redox.][52656] Stabilized APIs --------------- - [`Arc::downcast`] - [`Iterator::flatten`] - [`Rc::downcast`] Cargo ----- - [Cargo can silently fix some bad lockfiles ][cargo/5831] You can use `--locked` to disable this behaviour. - [`cargo-install` will now allow you to cross compile an install using `--target`][cargo/5614] - [Added the `cargo-fix` subcommand to automatically move project code from 2015 edition to 2018.][cargo/5723] Misc ---- - [`rustdoc` now has the `--cap-lints` option which demotes all lints above the specified level to that level.][52354] For example `--cap-lints warn` will demote `deny` and `forbid` lints to `warn`. - [`rustc` and `rustdoc` will now have the exit code of `1` if compilation fails, and `101` if there is a panic.][52197] - [A preview of clippy has been made available through rustup.][51122] You can install the preview with `rustup component add clippy-preview` Compatibility Notes ------------------- - [`str::{slice_unchecked, slice_unchecked_mut}` are now deprecated.][51807] Use `str::get_unchecked(begin..end)` instead. - [`std::env::home_dir` is now deprecated for its unintuitive behaviour.][51656] Consider using the `home_dir` function from https://crates.io/crates/dirs instead. - [`rustc` will no longer silently ignore invalid data in target spec.][52330] [52861]: https://github.com/rust-lang/rust/pull/52861/ [52656]: https://github.com/rust-lang/rust/pull/52656/ [52239]: https://github.com/rust-lang/rust/pull/52239/ [52330]: https://github.com/rust-lang/rust/pull/52330/ [52354]: https://github.com/rust-lang/rust/pull/52354/ [52402]: https://github.com/rust-lang/rust/pull/52402/ [52103]: https://github.com/rust-lang/rust/pull/52103/ [52197]: https://github.com/rust-lang/rust/pull/52197/ [51807]: https://github.com/rust-lang/rust/pull/51807/ [51899]: https://github.com/rust-lang/rust/pull/51899/ [51912]: https://github.com/rust-lang/rust/pull/51912/ [51511]: https://github.com/rust-lang/rust/pull/51511/ [51619]: https://github.com/rust-lang/rust/pull/51619/ [51656]: https://github.com/rust-lang/rust/pull/51656/ [51178]: https://github.com/rust-lang/rust/pull/51178/ [51122]: https://github.com/rust-lang/rust/pull/51122 [50494]: https://github.com/rust-lang/rust/pull/50494/ [cargo/5614]: https://github.com/rust-lang/cargo/pull/5614/ [cargo/5723]: https://github.com/rust-lang/cargo/pull/5723/ [cargo/5831]: https://github.com/rust-lang/cargo/pull/5831/ [`Arc::downcast`]: https://doc.rust-lang.org/std/sync/struct.Arc.html#method.downcast [`Iterator::flatten`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#method.flatten [`Rc::downcast`]: https://doc.rust-lang.org/std/rc/struct.Rc.html#method.downcast
2018-09-03Restore maybe accidental comment-out in NetBSD/i386 conditional.ryoon2-7/+16
And do not use 1.28.0 bootstrap for FreeBSD. This will fix the problem from gdt@.
2018-08-22Recursive bump for perl5-5.28.0wiz1-2/+2
2018-08-16revbump after boost-libs updateadam1-1/+2
2018-08-13rust: Switch to the 1.28.0 bootstrap for SunOS too.jperkin2-6/+7
It looks like I accidentally built the 1.27.2 bootstrap without the stack clash fix required for newer illumos platforms, so just use 1.28.0 which was built correctly for now.
2018-08-09Enable NetBSD/i386 support and fix NetBSD buildryoon2-10/+12
* 1.27.2 bootstrap kit has a serious bug and does not work under NetBSD. So use 1.28.0 instead.
2018-08-09rust: Update to version 1.28.0.jperkin5-108/+129
NetBSD/i386 is temporarily disabled due to missing binary bootstraps. Version 1.28.0 (2018-08-02) =========================== Language -------- - [The `#[repr(transparent)]` attribute is now stable.][51562] This attribute allows a Rust newtype wrapper (`struct NewType<T>(T);`) to be represented as the inner type across Foreign Function Interface (FFI) boundaries. - [The keywords `pure`, `sizeof`, `alignof`, and `offsetof` have been unreserved and can now be used as identifiers.][51196] - [The `GlobalAlloc` trait and `#[global_allocator]` attribute are now stable.][51241] This will allow users to specify a global allocator for their program. - [Unit test functions marked with the `#[test]` attribute can now return `Result<(), E: Debug>` in addition to `()`.][51298] - [The `lifetime` specifier for `macro_rules!` is now stable.][50385] This allows macros to easily target lifetimes. Compiler -------- - [The `s` and `z` optimisation levels are now stable.][50265] These optimisations prioritise making smaller binary sizes. `z` is the same as `s` with the exception that it does not vectorise loops, which typically results in an even smaller binary. - [The short error format is now stable.][49546] Specified with `--error-format=short` this option will provide a more compressed output of rust error messages. - [Added a lint warning when you have duplicated `macro_export`s.][50143] - [Reduced the number of allocations in the macro parser.][50855] This can improve compile times of macro heavy crates on average by 5%. Libraries --------- - [Implemented `Default` for `&mut str`.][51306] - [Implemented `From<bool>` for all integer and unsigned number types.][50554] - [Implemented `Extend` for `()`.][50234] - [The `Debug` implementation of `time::Duration` should now be more easily human readable.][50364] Previously a `Duration` of one second would printed as `Duration { secs: 1, nanos: 0 }` and will now be printed as `1s`. - [Implemented `From<&String>` for `Cow<str>`, `From<&Vec<T>>` for `Cow<[T]>`, `From<Cow<CStr>>` for `CString`, `From<CString>, From<CStr>, From<&CString>` for `Cow<CStr>`, `From<OsString>, From<OsStr>, From<&OsString>` for `Cow<OsStr>`, `From<&PathBuf>` for `Cow<Path>`, and `From<Cow<Path>>` for `PathBuf`.][50170] - [Implemented `Shl` and `Shr` for `Wrapping<u128>` and `Wrapping<i128>`.][50465] - [`DirEntry::metadata` now uses `fstatat` instead of `lstat` when possible.][51050] This can provide up to a 40% speed increase. - [Improved error messages when using `format!`.][50610] Stabilized APIs --------------- - [`Iterator::step_by`] - [`Path::ancestors`] - [`SystemTime::UNIX_EPOCH`] - [`alloc::GlobalAlloc`] - [`alloc::Layout`] - [`alloc::LayoutErr`] - [`alloc::System`] - [`alloc::alloc`] - [`alloc::alloc_zeroed`] - [`alloc::dealloc`] - [`alloc::realloc`] - [`alloc::handle_alloc_error`] - [`btree_map::Entry::or_default`] - [`fmt::Alignment`] - [`hash_map::Entry::or_default`] - [`iter::repeat_with`] - [`num::NonZeroUsize`] - [`num::NonZeroU128`] - [`num::NonZeroU16`] - [`num::NonZeroU32`] - [`num::NonZeroU64`] - [`num::NonZeroU8`] - [`ops::RangeBounds`] - [`slice::SliceIndex`] - [`slice::from_mut`] - [`slice::from_ref`] - [`{Any + Send + Sync}::downcast_mut`] - [`{Any + Send + Sync}::downcast_ref`] - [`{Any + Send + Sync}::is`] Cargo ----- - [Cargo will now no longer allow you to publish crates with build scripts that modify the `src` directory.][cargo/5584] The `src` directory in a crate should be considered to be immutable. Misc ---- - [The `suggestion_applicability` field in `rustc`'s json output is now stable.][50486] This will allow dev tools to check whether a code suggestion would apply to them. Compatibility Notes ------------------- - [Rust will no longer consider trait objects with duplicated constraints to have implementations.][51276] For example the below code will now fail to compile. ```rust trait Trait {} impl Trait + Send { fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test` } impl Trait + Send + Send { fn test(&self) { println!("two"); } } ```
2018-07-30Regen for NetBSD/i386 bootstrap kitryoon1-9/+9
I have accidentally removed old kit. It seems that ftp.NetBSD.org does not mirror it.
2018-07-22Update to 1.27.2ryoon2-7/+7
Changelog: Version 1.27.2 (2018-07-20) Compatibility Notes * The borrow checker was fixed to avoid potential unsoundness when using match ergonomics: #52213. Version 1.27.1 (2018-07-10) Security Notes * rustdoc would execute plugins in the /tmp/rustdoc/plugins directory when running, which enabled executing code as some other user on a given machine. This release fixes that vulnerability; you can read more about this on the blog. Thank you to Red Hat for responsibily disclosing this vulnerability to us. Compatibility Notes * The borrow checker was fixed to avoid an additional potential unsoundness when using match ergonomics: #51415, #49534.
2018-07-18rust: Add more libraries to the stage0 fixup.jperkin1-2/+2
2018-07-16Update to 1.27.1ryoon2-15/+15
Changelog: Version 1.27.1 (2018-07-10) Security Notes rustdoc would execute plugins in the /tmp/rustdoc/plugins directory when running, which enabled executing code as some other user on a given machine. This release fixes that vulnerability; you can read more about this on the blog. Thank you to Red Hat for responsibily disclosing this vulnerability to us. Compatibility Notes The borrow checker was fixed to avoid an additional potential unsoundness when using match ergonomics: #51415, #49534
2018-07-06rust: Set CARGO_BUILD_JOBS to MAKE_JOBS.jperkin1-12/+5
cargo defaults to using the number of CPUs detected on the host machine, which is a terrible heuristic and can easily lead to DRAM exhaustion, especially in a zones environment where you have access to the full number of CPUs but will be limited to a portion of available DRAM. Tidy up a SunOS section while here.
2018-07-04*: Move SUBST_STAGE from post-patch to pre-configurejperkin1-2/+2
Performing substitutions during post-patch breaks tools such as mkpatches, making it very difficult to regenerate correct patches after making changes, and often leading to substituted string replacements being committed.
2018-06-25Add missing patch to fix build on NetBSDryoon2-1/+31
2018-06-24Update to 1.27.0ryoon3-76/+99
* SunOS parts are from jperkin@. Changelog: Version 1.27.0 (2018-06-21) Language Removed 'proc' from the reserved keywords list. This allows proc to be used as an identifer. The dyn syntax is now available. This syntax is equivalent to the bare Trait syntax, and should make it clearer when being used in tandem with impl Trait. Since it is equivalent to the following syntax: &Trait == &dyn Trait, &mut Trait == &mut dyn Trait, and Box<Trait> == Box<dyn Trait>. Attributes on generic parameters such as types and lifetimes are now stable. e.g. fn foo<#[lifetime_attr] 'a, #[type_attr] T: 'a>() {} The #[must_use] attribute can now also be used on functions as well as types. It provides a lint that by default warns users when the value returned by a function has not been used. Compiler Added the armv5te-unknown-linux-musl target. Libraries SIMD (Single Instruction Multiple Data) on x86/x86_64 is now stable. This includes arch::x86 & arch::x86_64 modules which contain SIMD intrinsics, a new macro called is_x86_feature_detected!, the #[target_feature(enable="")] attribute, and adding target_feature = "" to the cfg attribute. A lot of methods for [u8], f32, and f64 previously only available in std are now available in core. The generic Rhs type parameter on ops::{Shl, ShlAssign, Shr} now defaults to Self. std::str::replace now has the #[must_use] attribute to clarify that the operation isn't done in place. Clone::clone, Iterator::collect, and ToOwned::to_owned now have the #[must_use] attribute to warn about unused potentially expensive allocations. Stabilized APIs DoubleEndedIterator::rfind DoubleEndedIterator::rfold DoubleEndedIterator::try_rfold Duration::from_micros Duration::from_nanos Duration::subsec_micros Duration::subsec_millis HashMap::remove_entry Iterator::try_fold Iterator::try_for_each NonNull::cast Option::filter String::replace_range Take::set_limit hint::unreachable_unchecked os::unix::process::parent_id process::id ptr::swap_nonoverlapping slice::rsplit_mut slice::rsplit slice::swap_with_slice Cargo cargo-metadata now includes authors, categories, keywords, readme, and repository fields. Added the --target-dir optional argument. This allows you to specify a different directory than target for placing compilation artifacts. Cargo will be adding automatic target inference for binaries, benchmarks, examples, and tests in the Rust 2018 edition. If your project specifies specific targets e.g. using [[bin]] and have other binaries in locations where cargo would infer a binary, Cargo will produce a warning. You can disable this feature ahead of time by setting any of the following autobins, autobenches, autoexamples, autotests to false. Cargo will now cache compiler information. This can be disabled by setting CARGO_CACHE_RUSTC_INFO=0 in your environment. Misc Added "The Rustc book" into the official documentation. "The Rustc book" documents and teaches how to use the rustc compiler. All books available on doc.rust-lang.org are now searchable. Compatibility Notes Calling a CharExt or StrExt method directly on core will no longer work. e.g. ::core::prelude::v1::StrExt::is_empty("") will not compile, "".is_empty() will still compile. Debug output on atomic::{AtomicBool, AtomicIsize, AtomicPtr, AtomicUsize} will only print the inner type. e.g. print!("{:?}", AtomicBool::new(true)) will print true not AtomicBool(true). The maximum number for repr(align(N)) is now 2^29. Previously you could enter higher numbers but they were not supported by LLVM. Up to 512MB alignment should cover all use cases.
2018-06-21rust: Restore SunOS support.jperkin4-9/+67
2018-06-19Update to 1.26.2ryoon2-7/+7
Changelog: Version 1.26.2 (2018-06-05) Compatibility Notes The borrow checker was fixed to avoid unsoundness when using match ergonomics
2018-06-01Update to 1.26.1ryoon2-7/+7
Changelog: Version 1.26.1 (2018-05-29) Tools RLS now works on Windows Rustfmt stopped badly formatting text in some cases Compatibility Notes fn main() -> impl Trait no longer works for non-Termination trait This reverts an accidental stabilization. NaN > NaN no longer returns true in const-fn contexts Prohibit using turbofish for impl Trait in method arguments
2018-05-18Update to 1.26.0ryoon3-89/+84
Changelog: Version 1.26.0 (2018-05-10) Language Closures now implement Copy and/or Clone if all captured variables implement either or both traits. The inclusive range syntax e.g. for x in 0..=10 is now stable. Stablise '_. The underscore lifetime can be used anywhere where a lifetime can be elided. impl Trait is now stable allowing you to have abstract types in returns or in function parameters. e.g. fn foo() -> impl Iterator<Item=u8> or fn open(path: impl AsRef<Path>). Pattern matching will now automatically apply dereferences. 128-bit integers in the form of u128 and i128 are now stable. main can now return Result<(), E: Debug> in addition to (). A lot of operations are now available in a const context. E.g. You can now index into constant arrays, reference and dereference into constants, and use Tuple struct constructors. Fixed entry slice patterns are now stable. e.g. let points = [1, 2, 3, 4]; match points { [1, 2, 3, 4] => println!("All points were sequential."), _ => println!("Not all points were sequential."), } Compiler LLD is now used as the default linker for wasm32-unknown-unknown. Fixed exponential projection complexity on nested types. This can provide up to a ~12% reduction in compile times for certain crates. Added the --remap-path-prefix option to rustc. Allowing you to remap path prefixes outputted by the compiler. Added powerpc-unknown-netbsd target. Libraries Implemented From<u16> for usize & From<{u8, i16}> for isize. Added hexadecimal formatting for integers with fmt::Debug e.g. assert!(format!("{:02x?}", b"Foo\0") == "[46, 6f, 6f, 00]") Implemented Default, Hash for cmp::Reverse. Optimized str::repeat being 8x faster in large cases. ascii::escape_default is now available in libcore. Trailing commas are now supported in std and core macros. Implemented Copy, Clone for cmp::Reverse Implemented Clone for char::{ToLowercase, ToUppercase}. Stabilized APIs *const T::add *const T::copy_to_nonoverlapping *const T::copy_to *const T::read_unaligned *const T::read_volatile *const T::read *const T::sub *const T::wrapping_add *const T::wrapping_sub *mut T::add *mut T::copy_to_nonoverlapping *mut T::copy_to *mut T::read_unaligned *mut T::read_volatile *mut T::read *mut T::replace *mut T::sub *mut T::swap *mut T::wrapping_add *mut T::wrapping_sub *mut T::write_bytes *mut T::write_unaligned *mut T::write_volatile *mut T::write Box::leak FromUtf8Error::as_bytes LocalKey::try_with Option::cloned btree_map::Entry::and_modify fs::read_to_string fs::read fs::write hash_map::Entry::and_modify iter::FusedIterator ops::RangeInclusive ops::RangeToInclusive process::id slice::rotate_left slice::rotate_right String::retain Cargo Cargo will now output path to custom commands when -v is passed with --list The Cargo binary version is now the same as the Rust version Cargo.lock files are now included in published crates. Misc The second edition of "The Rust Programming Language" book is now recommended over the first. Compatibility Notes aliasing a Fn trait as dyn no longer works. E.g. the following syntax is now invalid. use std::ops::Fn as dyn; fn g(_: Box<dyn(std::fmt::Debug)>) {} The result of dereferences are no longer promoted to 'static. e.g. fn main() { const PAIR: &(i32, i32) = &(0, 1); let _reversed_pair: &'static _ = &(PAIR.1, PAIR.0); // Doesn't work } Deprecate AsciiExt trait in favor of inherent methods. ".e0" will now no longer parse as 0.0 and will instead cause an error. Removed hoedown from rustdoc. Bounds on higher-kinded lifetimes a hard error.
2018-05-06Add a show-cargo-depends target, sparing the effort of listing cargomaya1-1/+11
dependencies manually. Document a bit and give some helpful tips.
2018-04-29revbump for boost-libs updateadam1-1/+2
2018-04-04rust: Re-enable SunOS support.jperkin2-9/+13
2018-04-04Update to 1.25.0ryoon3-87/+72
Changelog: Version 1.25.0 (2018-03-29) Language Stabilised #[repr(align(x))]. RFC 1358 You can now use nested groups of imports. e.g. use std::{fs::File, io::Read, path::{Path, PathBuf}}; You can now have | at the start of a match arm. e.g. enum Foo { A, B, C } fn main() { let x = Foo::A; match x { | Foo::A | Foo::B => println!("AB"), | Foo::C => println!("C"), } } Compiler Upgraded to LLVM 6. Added -C lto=val option. Added i586-unknown-linux-musl target Libraries Impl Send for process::Command on Unix. Impl PartialEq and Eq for ParseCharError. UnsafeCell::into_inner is now safe. Implement libstd for CloudABI. Float::{from_bits, to_bits} is now available in libcore. Implement AsRef<Path> for Component Implemented Write for Cursor<&mut Vec<u8>> Moved Duration to libcore. Stabilized APIs Location::column ptr::NonNull The following functions can now be used in a constant expression. eg. static MINUTE: Duration = Duration::from_secs(60); Duration::new Duration::from_secs Duration::from_millis Cargo cargo new no longer removes rust or rs prefixs/suffixs. cargo new now defaults to creating a binary crate, instead of a library crate. Misc Rust by example is now shipped with new releases Compatibility Notes Deprecated net::lookup_host. rustdoc has switched to pulldown as the default markdown renderer. The borrow checker was sometimes incorrectly permitting overlapping borrows around indexing operations (see #47349). This has been fixed (which also enabled some correct code that used to cause errors (e.g. #33903 and #46095). Removed deprecated unstable attribute #[simd].
2018-03-03Update to 1.24.1ryoon2-7/+7
Changelog: Do not abort when unwinding through FFI (this reverts behavior added in 1.24.0) Emit UTF-16 files for linker arguments on Windows Make the error index generator work again Cargo will warn on Windows 7 if an update is needed.
2018-03-02Enable FreeBSD supporttriaxx3-6/+51
2018-02-18Update to 1.24.0ryoon2-67/+63
* Disable SunOS support for a while Changelog: Version 1.24.0 (2018-02-15) Language External sysv64 ffi is now available. eg. extern "sysv64" fn foo () {} Compiler rustc now uses 16 codegen units by default for release builds. For the fastest builds, utilize codegen-units=1. Added armv4t-unknown-linux-gnueabi target. Add aarch64-unknown-openbsd support Libraries str::find::<char> now uses memchr. This should lead to a 10x improvement in performance in the majority of cases. OsStr's Debug implementation is now lossless and consistent with Windows. time::{SystemTime, Instant} now implement Hash. impl From<bool> for AtomicBool impl From<{CString, &CStr}> for {Arc<CStr>, Rc<CStr>} impl From<{OsString, &OsStr}> for {Arc<OsStr>, Rc<OsStr>} impl From<{PathBuf, &Path}> for {Arc<Path>, Rc<Path>} float::from_bits now just uses transmute. This provides some optimisations from LLVM. Copied AsciiExt methods onto char Remove T: Sized requirement on ptr::is_null() impl From<RecvError> for {TryRecvError, RecvTimeoutError} Optimised f32::{min, max} to generate more efficent x86 assembly [u8]::contains now uses memchr which provides a 3x speed improvement Stabilized APIs RefCell::replace RefCell::swap atomic::spin_loop_hint The following functions can now be used in a constant expression. eg. let buffer: [u8; size_of::<usize>()];, static COUNTER: AtomicUsize = AtomicUsize::new(1); AtomicBool::new AtomicUsize::new AtomicIsize::new AtomicPtr::new Cell::new {integer}::min_value {integer}::max_value mem::size_of mem::align_of ptr::null ptr::null_mut RefCell::new UnsafeCell::new Cargo Added a workspace.default-members config that overrides implied --all in virtual workspaces. Enable incremental by default on development builds. Also added configuration keys to Cargo.toml and .cargo/config to disable on a per-project or global basis respectively. Misc Compatibility Notes Floating point types Debug impl now always prints a decimal point. Ipv6Addr now rejects superfluous ::'s in IPv6 addresses This is in accordance with IETF RFC 4291 Sec. 2.2. Unwinding will no longer go past FFI boundaries, and will instead abort. Formatter::flags method is now deprecated. The sign_plus, sign_minus, alternate, and sign_aware_zero_pad should be used instead. Leading zeros in tuple struct members is now an error column!() macro is one-based instead of zero-based fmt::Arguments can no longer be shared across threads Access to #[repr(packed)] struct fields is now unsafe Cargo sets a different working directory for the compiler
2018-01-09Enable SunOS/Solaris supportryoon2-9/+13
However SunOS build fails with internal libtool.