49 commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
jperkin
|
8f80109c90 |
rust: Update to 1.40.0.
Version 1.40.0 (2019-12-19) =========================== Language -------- - [You can now use tuple `struct`s and tuple `enum` variant's constructors in `const` contexts.][65188] e.g. ```rust pub struct Point(i32, i32); const ORIGIN: Point = { let constructor = Point; constructor(0, 0) }; ``` - [You can now mark `struct`s, `enum`s, and `enum` variants with the `#[non_exhaustive]` attribute to indicate that there may be variants or fields added in the future.][64639] 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.][63931] e.g. `type Generated = macro!();` - [Function-like and attribute procedural macros can now emit `macro_rules!` items, so you can now have your macros generate macros.][64035] - [The `meta` pattern matcher in `macro_rules!` now correctly matches the modern attribute syntax.][63674] For example `(#[$m:meta])` now matches `#[attr]`, `#[attr{tokens}]`, `#[attr[tokens]]`, and `#[attr(tokens)]`. Compiler -------- - [Added tier 3 support\* for the `thumbv7neon-unknown-linux-musleabihf` target.][66103] - [Added tier 3 support for the `aarch64-unknown-none-softfloat` target.][64589] - [Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and `mips64el-unknown-linux-muslabi64` targets.][65843] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries --------- - [The `is_power_of_two` method on unsigned numeric types is now a `const` function.][65092] Stabilized APIs --------------- - [`BTreeMap::get_key_value`] - [`HashMap::get_key_value`] - [`Option::as_deref_mut`] - [`Option::as_deref`] - [`Option::flatten`] - [`UdpSocket::peer_addr`] - [`f32::to_be_bytes`] - [`f32::to_le_bytes`] - [`f32::to_ne_bytes`] - [`f64::to_be_bytes`] - [`f64::to_le_bytes`] - [`f64::to_ne_bytes`] - [`f32::from_be_bytes`] - [`f32::from_le_bytes`] - [`f32::from_ne_bytes`] - [`f64::from_be_bytes`] - [`f64::from_le_bytes`] - [`f64::from_ne_bytes`] - [`mem::take`] - [`slice::repeat`] - [`todo!`] Cargo ----- - [Cargo will now always display warnings, rather than only on fresh builds.][cargo/7450] - [Feature flags (except `--all-features`) passed to a virtual workspace will now produce an error.][cargo/7507] Previously these flags were ignored. - [You can now publish `dev-dependencies` without including a `version`.][cargo/7333] Misc ---- - [You can now specify the `#[cfg(doctest)]` attribute to include an item only when running documentation tests with `rustdoc`.][63803] Compatibility Notes ------------------- - [As previously announced, any previous NLL warnings in the 2015 edition are now hard errors.][64221] - [The `include!` macro will now warn if it failed to include the entire file.][64284] 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.][65294] Using `#[inline]` anywhere else inside traits or `extern` blocks now correctly emits a hard error. [65294]: https://github.com/rust-lang/rust/pull/65294/ [66103]: https://github.com/rust-lang/rust/pull/66103/ [65843]: https://github.com/rust-lang/rust/pull/65843/ [65188]: https://github.com/rust-lang/rust/pull/65188/ [65092]: https://github.com/rust-lang/rust/pull/65092/ [64589]: https://github.com/rust-lang/rust/pull/64589/ [64639]: https://github.com/rust-lang/rust/pull/64639/ [64221]: https://github.com/rust-lang/rust/pull/64221/ [64284]: https://github.com/rust-lang/rust/pull/64284/ [63931]: https://github.com/rust-lang/rust/pull/63931/ [64035]: https://github.com/rust-lang/rust/pull/64035/ [63674]: https://github.com/rust-lang/rust/pull/63674/ [63803]: https://github.com/rust-lang/rust/pull/63803/ [cargo/7450]: https://github.com/rust-lang/cargo/pull/7450/ [cargo/7507]: https://github.com/rust-lang/cargo/pull/7507/ [cargo/7525]: https://github.com/rust-lang/cargo/pull/7525/ [cargo/7333]: https://github.com/rust-lang/cargo/pull/7333/ [(rfc 2008)]: https://rust-lang.github.io/rfcs/2008-non-exhaustive.html [`f32::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_be_bytes [`f32::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_le_bytes [`f32::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.to_ne_bytes [`f64::to_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_be_bytes [`f64::to_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_le_bytes [`f64::to_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.to_ne_bytes [`f32::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_be_bytes [`f32::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_le_bytes [`f32::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f32.html#method.from_ne_bytes [`f64::from_be_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_be_bytes [`f64::from_le_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_le_bytes [`f64::from_ne_bytes`]: https://doc.rust-lang.org/std/primitive.f64.html#method.from_ne_bytes [`option::flatten`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.flatten [`option::as_deref`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref [`option::as_deref_mut`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.as_deref_mut [`hashmap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.HashMap.html#method.get_key_value [`btreemap::get_key_value`]: https://doc.rust-lang.org/std/collections/struct.BTreeMap.html#method.get_key_value [`slice::repeat`]: https://doc.rust-lang.org/std/primitive.slice.html#method.repeat [`mem::take`]: https://doc.rust-lang.org/std/mem/fn.take.html [`udpsocket::peer_addr`]: https://doc.rust-lang.org/std/net/struct.UdpSocket.html#method.peer_addr [`todo!`]: https://doc.rust-lang.org/std/macro.todo.html |
||
ryoon
|
c976ef7bdb | Regen distinfo and add more patch for RPATH to fix build | ||
he
|
d9e14a82c7 |
Undo insertion of tabs in rust source, as this would make the
test target fail. Thanks jperkin! Also, bump NetBSD/sparc64 bootstrap to 1.38. |
||
he
|
193e701204 |
Update rust to version 1.39.0.
Pkgsrc changes: * Remove patch which no longer applies (but what about RPATH?) * Adapt a few patches to changed files upstream. Upstream changes: Version 1.39.0 (2019-11-07) =========================== Language -------- - [You can now create `async` functions and blocks with `async fn`, `async move {}`, and `async {}` respectively, and you can now call `.await` on async expressions.][63209] - [You can now use certain attributes on function, closure, and function pointer parameters.][64010] These attributes include `cfg`, `cfg_attr`, `allow`, `warn`, `deny`, `forbid` as well as inert helper attributes used by procedural macro attributes applied to items. e.g. ```rust fn len( #[cfg(windows)] slice: &[u16], #[cfg(not(windows))] slice: &[u8], ) -> usize { slice.len() } ``` - [You can now take shared references to bind-by-move patterns in the `if` guards of `match` arms.][63118] e.g. ```rust fn main() { let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]); match array { nums // ---- `nums` is bound by move. if nums.iter().sum::<u8>() == 10 // ^------ `.iter()` implicitly takes a reference to `nums`. => { drop(nums); // ----------- Legal as `nums` was bound by move and so we have ownership. } _ => unreachable!(), } } ``` Compiler -------- - [Added tier 3\* support for the `i686-unknown-uefi` target.][64334] - [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595] - [rustc will now trim code snippets in diagnostics to fit in your terminal.] [63402] **Note** Cargo currently doesn't use this feature. Refer to [cargo#7315][cargo/7315] to track this feature's progress. - [You can now pass `--show-output` argument to test binaries to print the output of successful tests.][62600] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries --------- - [`Vec::new` and `String::new` are now `const` functions.][64028] - [`LinkedList::new` is now a `const` function.][63684] - [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770] - [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are now `const`.][63786] Stabilized APIs --------------- - [`Pin::into_inner`] - [`Instant::checked_duration_since`] - [`Instant::saturating_duration_since`] Cargo ----- - [You can now publish git dependencies if supplied with a `version`.] [cargo/7237] - [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using `--all` is now deprecated. Misc ---- - [You can now pass `-Clinker` to rustdoc to control the linker used for compiling doctests.][63834] Compatibility Notes ------------------- - [Code that was previously accepted by the old borrow checker, but rejected by the NLL borrow checker is now a hard error in Rust 2018.][63565] This was previously a warning, and will also become a hard error in the Rust 2015 edition in the 1.40.0 release. - [`rustdoc` now requires `rustc` to be installed and in the same directory to run tests.][63827] This should improve performance when running a large amount of doctests. - [The `try!` macro will now issue a deprecation warning.][62672] It is recommended to use the `?` operator instead. - [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this returned `0.0`. [62600]: https://github.com/rust-lang/rust/pull/62600/ [62672]: https://github.com/rust-lang/rust/pull/62672/ [63118]: https://github.com/rust-lang/rust/pull/63118/ [63209]: https://github.com/rust-lang/rust/pull/63209/ [63402]: https://github.com/rust-lang/rust/pull/63402/ [63565]: https://github.com/rust-lang/rust/pull/63565/ [63595]: https://github.com/rust-lang/rust/pull/63595/ [63684]: https://github.com/rust-lang/rust/pull/63684/ [63698]: https://github.com/rust-lang/rust/pull/63698/ [63770]: https://github.com/rust-lang/rust/pull/63770/ [63786]: https://github.com/rust-lang/rust/pull/63786/ [63827]: https://github.com/rust-lang/rust/pull/63827/ [63834]: https://github.com/rust-lang/rust/pull/63834/ [63927]: https://github.com/rust-lang/rust/pull/63927/ [63933]: https://github.com/rust-lang/rust/pull/63933/ [63934]: https://github.com/rust-lang/rust/pull/63934/ [63938]: https://github.com/rust-lang/rust/pull/63938/ [63940]: https://github.com/rust-lang/rust/pull/63940/ [63941]: https://github.com/rust-lang/rust/pull/63941/ [63945]: https://github.com/rust-lang/rust/pull/63945/ [64010]: https://github.com/rust-lang/rust/pull/64010/ [64028]: https://github.com/rust-lang/rust/pull/64028/ [64334]: https://github.com/rust-lang/rust/pull/64334/ [cargo/7237]: https://github.com/rust-lang/cargo/pull/7237/ [cargo/7241]: https://github.com/rust-lang/cargo/pull/7241/ [cargo/7315]: https://github.com/rust-lang/cargo/pull/7315/ [`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner [`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since [`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since |
||
jperkin
|
b556d9e906 | rust: Fix SunOS builds with newer compilers. | ||
he
|
86b1a18e32 |
Bump bootstrap version to 1.38.0 for NetBSD/aarch64 (9.0),
NetBSD/amd64 (8.0) and NetBSD/i386 (8.0). These bootstraps do not use the pkgsrc llvm, i.e. are built with the rust-llvm option. Disable warnings as fatal errors; 1.38.0 building 1.38.0 produces warnings which would otherwise be fatal, ref. https://github.com/rust-lang/rust/issues/65722 Also, revert back to BUILD_TARGET=build which I mistakenly changed to "dist" previously. Bump PKGVERSION. |
||
he
|
574a18d73c |
Update rust to version 1.38.0.
Pkgsrc changes: * Adapt to the move of the implementation of random numbers. * Remove patch which is no longer relevant (Signals.inc) * Cross-build currently fails due to the still unresolved https://github.com/rust-lang/rust/issues/62558, so bootstrap kits for 1.38.0 have to be built natively, and will follow shortly. * Bump bootstrap requirements to 1.37.0 except for armv7-unknown-netbsd-eabihf which I've neither managed to cross-build nor build natively. Upstream changes: Version 1.38.0 (2019-09-26) ========================== Language -------- - [The `#[global_allocator]` attribute can now be used in submodules.][62735] - [The `#[deprecated]` attribute can now be used on macros.][62042] Compiler -------- - [Added pipelined compilation support to `rustc`.][62766] This will improve compilation times in some cases. For further information please refer to the [_"Evaluating pipelined rustc compilation"_][pipeline-internals] thread. - [Added tier 3\* support for the `aarch64-uwp-windows-msvc`, `i686-uwp-windows-gnu`, `i686-uwp-windows-msvc`, `x86_64-uwp-windows-gnu`, and `x86_64-uwp-windows-msvc` targets.][60260] - [Added tier 3 support for the `armv7-unknown-linux-gnueabi` and `armv7-unknown-linux-musleabi` targets.][63107] - [Added tier 3 support for the `hexagon-unknown-linux-musl` target.][62814] - [Added tier 3 support for the `riscv32i-unknown-none-elf` target.][62784] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries --------- - [`ascii::EscapeDefault` now implements `Clone` and `Display`.][63421] - [Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now available at the same path as the trait.][63056] (e.g. The `Clone` derive macro is available at `std::clone::Clone`). This also makes all built-in macros available in `std`/`core` root. e.g. `std::include_bytes!`. - [`str::Chars` now implements `Debug`.][63000] - [`slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.][62528] - [`*const T` and `*mut T` now implement `marker::Unpin`.][62583] - [`Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.][61953] - [Added euclidean remainder and division operations (`div_euclid`, `rem_euclid`) to all numeric primitives.][61884] Additionally `checked`, `overflowing`, and `wrapping` versions are available for all integer primitives. - [`thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and `PartialEq`.][61491] - [`iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.][61457] Stabilized APIs --------------- - [`<*const T>::cast`] - [`<*mut T>::cast`] - [`Duration::as_secs_f32`] - [`Duration::as_secs_f64`] - [`Duration::div_duration_f32`] - [`Duration::div_duration_f64`] - [`Duration::div_f32`] - [`Duration::div_f64`] - [`Duration::from_secs_f32`] - [`Duration::from_secs_f64`] - [`Duration::mul_f32`] - [`Duration::mul_f64`] - [`any::type_name`] Cargo ----- - [Added pipelined compilation support to `cargo`.][cargo/7143] - [You can now pass the `--features` option multiple times to enable multiple features.][cargo/7084] Misc ---- - [`rustc` will now warn about some incorrect uses of `mem::{uninitialized, zeroed}` that are known to cause undefined behaviour.][63346] Compatibility Notes ------------------- - Unfortunately the [`x86_64-unknown-uefi` platform can not be built][62785] with rustc 1.39.0. - The [`armv7-unknown-linux-gnueabihf` platform is also known to have issues][62896] for certain crates such as libc. [60260]: https://github.com/rust-lang/rust/pull/60260/ [61457]: https://github.com/rust-lang/rust/pull/61457/ [61491]: https://github.com/rust-lang/rust/pull/61491/ [61884]: https://github.com/rust-lang/rust/pull/61884/ [61953]: https://github.com/rust-lang/rust/pull/61953/ [62042]: https://github.com/rust-lang/rust/pull/62042/ [62528]: https://github.com/rust-lang/rust/pull/62528/ [62583]: https://github.com/rust-lang/rust/pull/62583/ [62735]: https://github.com/rust-lang/rust/pull/62735/ [62766]: https://github.com/rust-lang/rust/pull/62766/ [62784]: https://github.com/rust-lang/rust/pull/62784/ [62785]: https://github.com/rust-lang/rust/issues/62785/ [62814]: https://github.com/rust-lang/rust/pull/62814/ [62896]: https://github.com/rust-lang/rust/issues/62896/ [63000]: https://github.com/rust-lang/rust/pull/63000/ [63056]: https://github.com/rust-lang/rust/pull/63056/ [63107]: https://github.com/rust-lang/rust/pull/63107/ [63346]: https://github.com/rust-lang/rust/pull/63346/ [63421]: https://github.com/rust-lang/rust/pull/63421/ [cargo/7084]: https://github.com/rust-lang/cargo/pull/7084/ [cargo/7143]: https://github.com/rust-lang/cargo/pull/7143/ [`<*const T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`<*mut T>::cast`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.cast [`Duration::as_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f32 [`Duration::as_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs_f64 [`Duration::div_duration_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_duration_f32 [`Duration::div_duration_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_duration_f64 [`Duration::div_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f32 [`Duration::div_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.div_f64 [`Duration::from_secs_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f32 [`Duration::from_secs_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.from_secs_f64 [`Duration::mul_f32`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f32 [`Duration::mul_f64`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.mul_f64 [`any::type_name`]: https://doc.rust-lang.org/std/any/fn.type_name.html [forge-platform-support]: https://forge.rust-lang.org/platform-support.html [pipeline-internals]: https://internals.rust-lang.org/t/evaluating-pipelined-rustc-compilation/10199 |
||
jperkin
|
8f5ddb5c3d |
rust: SunOS now requires libnsl.
While here fix some tabs->spaces to make the test suite work again. |
||
adam
|
df99f31028 | rust: on Darwin, use proper shared library name instead of @rpath | ||
he
|
4c27d0de9b |
Update rust to version 1.37.0
Pkgsrc changes: * Add a patch to llvm to deal with const dli_saddr. * Adapt two other patches. * Cross-build currently fails, so i386, powerpc and sparc64 bootstrap kits for 1.37.0 are built natively. Missing aarch64 hardware, so that's not available yet. * Bump bootstrap requirements to 1.36.0 except for armv7-unknown-netbsd-eabihf which I've not managed to cross-build. Upstream changes: Version 1.37.0 (2019-08-15) ========================== Language -------- - `#[must_use]` will now warn if the type is contained in a [tuple][61100], [`Box`][62228], or an [array][62235] and unused. - [You can now use the `cfg` and `cfg_attr` attributes on generic parameters.][61547] - [You can now use enum variants through type alias.][61682] e.g. You can write the following: ```rust type MyOption = Option<u8>; fn increment_or_zero(x: MyOption) -> u8 { match x { MyOption::Some(y) => y + 1, MyOption::None => 0, } } ``` - [You can now use `_` as an identifier for consts.][61347] e.g. You can write `const _: u32 = 5;`. - [You can now use `#[repr(align(X)]` on enums.][61229] - [The `?`/_"Kleene"_ macro operator is now available in the 2015 edition.][60932] Compiler -------- - [You can now enable Profile-Guided Optimization with the `-C profile-generate` and `-C profile-use` flags.][61268] For more information on how to use profile guided optimization, please refer to the [rustc book][rustc-book-pgo]. - [The `rust-lldb` wrapper script should now work again.][61827] Libraries --------- - [`mem::MaybeUninit<T>` is now ABI-compatible with `T`.][61802] Stabilized APIs --------------- - [`BufReader::buffer`] - [`BufWriter::buffer`] - [`Cell::from_mut`] - [`Cell<[T]>::as_slice_of_cells`][`Cell<slice>::as_slice_of_cells`] - [`DoubleEndedIterator::nth_back`] - [`Option::xor`] - [`Wrapping::reverse_bits`] - [`i128::reverse_bits`] - [`i16::reverse_bits`] - [`i32::reverse_bits`] - [`i64::reverse_bits`] - [`i8::reverse_bits`] - [`isize::reverse_bits`] - [`slice::copy_within`] - [`u128::reverse_bits`] - [`u16::reverse_bits`] - [`u32::reverse_bits`] - [`u64::reverse_bits`] - [`u8::reverse_bits`] - [`usize::reverse_bits`] Cargo ----- - [`Cargo.lock` files are now included by default when publishing executable crates with executables.][cargo/7026] - [You can now specify `default-run="foo"` in `[package]` to specify the default executable to use for `cargo run`.][cargo/7056] Misc ---- Compatibility Notes ------------------- - [Using `...` for inclusive range patterns will now warn by default.][61342] Please transition your code to using the `..=` syntax for inclusive ranges instead. - [Using a trait object without the `dyn` will now warn by default.][61203] Please transition your code to use `dyn Trait` for trait objects instead. [62228]: https://github.com/rust-lang/rust/pull/62228/ [62235]: https://github.com/rust-lang/rust/pull/62235/ [61802]: https://github.com/rust-lang/rust/pull/61802/ [61827]: https://github.com/rust-lang/rust/pull/61827/ [61547]: https://github.com/rust-lang/rust/pull/61547/ [61682]: https://github.com/rust-lang/rust/pull/61682/ [61268]: https://github.com/rust-lang/rust/pull/61268/ [61342]: https://github.com/rust-lang/rust/pull/61342/ [61347]: https://github.com/rust-lang/rust/pull/61347/ [61100]: https://github.com/rust-lang/rust/pull/61100/ [61203]: https://github.com/rust-lang/rust/pull/61203/ [61229]: https://github.com/rust-lang/rust/pull/61229/ [60932]: https://github.com/rust-lang/rust/pull/60932/ [cargo/7026]: https://github.com/rust-lang/cargo/pull/7026/ [cargo/7056]: https://github.com/rust-lang/cargo/pull/7056/ [`BufReader::buffer`]: https://doc.rust-lang.org/std/io/struct.BufReader.html#method.buffer [`BufWriter::buffer`]: https://doc.rust-lang.org/std/io/struct.BufWriter.html#method.buffer [`Cell::from_mut`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.from_mut [`Cell<slice>::as_slice_of_cells`]: https://doc.rust-lang.org/std/cell/struct.Cell.html#method.as_slice_of_cells [`DoubleEndedIterator::nth_back`]: https://doc.rust-lang.org/std/iter/trait.DoubleEndedIterator.html#method.nth_back [`Option::xor`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.xor [`RefCell::try_borrow_unguarded`]: https://doc.rust-lang.org/std/cell/struct.RefCell.html#method.try_borrow_unguarded [`Wrapping::reverse_bits`]: https://doc.rust-lang.org/std/num/struct.Wrapping.html#method.reverse_bits [`i128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i128.html#method.reverse_bits [`i16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i16.html#method.reverse_bits [`i32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i32.html#method.reverse_bits [`i64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i64.html#method.reverse_bits [`i8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.i8.html#method.reverse_bits [`isize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.isize.html#method.reverse_bits [`slice::copy_within`]: https://doc.rust-lang.org/std/primitive.slice.html#method.copy_within [`u128::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u128.html#method.reverse_bits [`u16::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u16.html#method.reverse_bits [`u32::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u32.html#method.reverse_bits [`u64::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u64.html#method.reverse_bits [`u8::reverse_bits`]: https://doc.rust-lang.org/std/primitive.u8.html#method.reverse_bits [`usize::reverse_bits`]: https://doc.rust-lang.org/std/primitive.usize.html#method.reverse_bits [rustc-book-pgo]: https://doc.rust-lang.org/rustc/profile-guided-optimization.html |
||
he
|
610cf091c8 |
Update rust to version 1.36.0
Pkgsrc changes: * NetBSD/sparc64 disabling of "packed" removed ("packed" removed upstream) * Adapt src_libstd_build.rs patch, update sed'ing of .cargo-checksum.json Build verified on NetBSD 8.0/amd64. Upstream changes: Version 1.36.0 (2019-07-04) ========================== Language -------- - [Non-Lexical Lifetimes are now enabled on the 2015 edition.][59114] - [The order of traits in trait objects no longer affects the semantics of that object.][59445] e.g. `dyn Send + fmt::Debug` is now equivalent to `dyn fmt::Debug + Send`, where this was previously not the case. Libraries --------- - [`HashMap`'s implementation has been replaced with `hashbrown::HashMap` implem entation.][58623] - [`TryFromSliceError` now implements `From<Infallible>`.][60318] - [`mem::needs_drop` is now available as a const fn.][60364] - [`alloc::Layout::from_size_align_unchecked` is now available as a const fn.][6 0370] - [`String` now implements `BorrowMut<str>`.][60404] - [`io::Cursor` now implements `Default`.][60234] - [Both `NonNull::{dangling, cast}` are now const fns.][60244] - [The `alloc` crate is now stable.][59675] `alloc` allows you to use a subset of `std` (e.g. `Vec`, `Box`, `Arc`) in `#![no_std]` environments if the environment has access to heap memory allocation. - [`String` now implements `From<&String>`.][59825] - [You can now pass multiple arguments to the `dbg!` macro.][59826] `dbg!` will return a tuple of each argument when there is multiple arguments. - [`Result::{is_err, is_ok}` are now `#[must_use]` and will produce a warning if not used.][59648] Stabilized APIs --------------- - [`VecDeque::rotate_left`] - [`VecDeque::rotate_right`] - [`Iterator::copied`] - [`io::IoSlice`] - [`io::IoSliceMut`] - [`Read::read_vectored`] - [`Write::write_vectored`] - [`str::as_mut_ptr`] - [`mem::MaybeUninit`] - [`pointer::align_offset`] - [`future::Future`] - [`task::Context`] - [`task::RawWaker`] - [`task::RawWakerVTable`] - [`task::Waker`] - [`task::Poll`] Cargo ----- - [Cargo will now produce an error if you attempt to use the name of a required dependency as a feature.][cargo/6860] - [You can now pass the `--offline` flag to run cargo without accessing the netw ork.][cargo/6934] You can find further change's in [Cargo's 1.36.0 release notes][cargo-1-36-0]. Clippy ------ There have been numerous additions and fixes to clippy, see [Clippy's 1.36.0 rel ease notes][clippy-1-36-0] for more details. Misc ---- Compatibility Notes ------------------- - [`std::arch::x86::_rdtsc` returns `u64` instead of `i64`][stdsimd/559] - [`std::arch::x86_64::_mm_shuffle_ps` takes an `i32` instead of `u32` for `mask `][stdsimd/522] - With the stabilisation of `mem::MaybeUninit`, `mem::uninitialized` use is no longer recommended, and will be deprecated in 1.38.0. [60318]: https://github.com/rust-lang/rust/pull/60318/ [60364]: https://github.com/rust-lang/rust/pull/60364/ [60370]: https://github.com/rust-lang/rust/pull/60370/ [60404]: https://github.com/rust-lang/rust/pull/60404/ [60234]: https://github.com/rust-lang/rust/pull/60234/ [60244]: https://github.com/rust-lang/rust/pull/60244/ [58623]: https://github.com/rust-lang/rust/pull/58623/ [59648]: https://github.com/rust-lang/rust/pull/59648/ [59675]: https://github.com/rust-lang/rust/pull/59675/ [59825]: https://github.com/rust-lang/rust/pull/59825/ [59826]: https://github.com/rust-lang/rust/pull/59826/ [59445]: https://github.com/rust-lang/rust/pull/59445/ [59114]: https://github.com/rust-lang/rust/pull/59114/ [cargo/6860]: https://github.com/rust-lang/cargo/pull/6860/ [cargo/6934]: https://github.com/rust-lang/cargo/pull/6934/ [`VecDeque::rotate_left`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_left [`VecDeque::rotate_right`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.rotate_right [`Iterator::copied`]: https://doc.rust-lang.org/std/iter/trait.Iterator.html#tymethod.copied [`io::IoSlice`]: https://doc.rust-lang.org/std/io/struct.IoSlice.html [`io::IoSliceMut`]: https://doc.rust-lang.org/std/io/struct.IoSliceMut.html [`Read::read_vectored`]: https://doc.rust-lang.org/std/io/trait.Read.html#method.read_vectored [`Write::write_vectored`]: https://doc.rust-lang.org/std/io/trait.Write.html#method.write_vectored [`str::as_mut_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_mut_ptr [`mem::MaybeUninit`]: https://doc.rust-lang.org/std/mem/union.MaybeUninit.html [`pointer::align_offset`]: https://doc.rust-lang.org/std/primitive.pointer.html#method.align_offset [`future::Future`]: https://doc.rust-lang.org/std/future/trait.Future.html [`task::Context`]: https://doc.rust-lang.org/beta/std/task/struct.Context.html [`task::RawWaker`]: https://doc.rust-lang.org/beta/std/task/struct.RawWaker.html [`task::RawWakerVTable`]: https://doc.rust-lang.org/beta/std/task/struct.RawWakerVTable.html [`task::Waker`]: https://doc.rust-lang.org/beta/std/task/struct.Waker.html [`task::Poll`]: https://doc.rust-lang.org/beta/std/task/enum.Poll.html [clippy-1-36-0]: https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-136 [cargo-1-36-0]: https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-136-2019-07-04 [stdsimd/522]: https://github.com/rust-lang-nursery/stdsimd/issues/522 [stdsimd/559]: https://github.com/rust-lang-nursery/stdsimd/issues/559 |
||
tnn
|
8927341786 |
rust: work around problem in rand vendor crate that made rustc very slow
... on some NetBSD hosts. To be discussed with upstream. |
||
jperkin
|
417717a880 |
rust: Update to 1.35.0.
Version 1.35.0 (2019-05-23) ========================== Language -------- - [`FnOnce`, `FnMut`, and the `Fn` traits are now implemented for `Box<FnOnce>`, `Box<FnMut>`, and `Box<Fn>` respectively.][59500] - [You can now coerce closures into unsafe function pointers.][59580] e.g. ```rust unsafe fn call_unsafe(func: unsafe fn()) { func() } pub fn main() { unsafe { call_unsafe(|| {}); } } ``` Compiler -------- - [Added the `armv6-unknown-freebsd-gnueabihf` and `armv7-unknown-freebsd-gnueabihf` targets.][58080] - [Added the `wasm32-unknown-wasi` target.][59464] Libraries --------- - [`Thread` will now show its ID in `Debug` output.][59460] - [`StdinLock`, `StdoutLock`, and `StderrLock` now implement `AsRawFd`.][59512] - [`alloc::System` now implements `Default`.][59451] - [Expanded `Debug` output (`{:#?}`) for structs now has a trailing comma on the last field.][59076] - [`char::{ToLowercase, ToUppercase}` now implement `ExactSizeIterator`.][58778] - [All `NonZero` numeric types now implement `FromStr`.][58717] - [Removed the `Read` trait bounds on the `BufReader::{get_ref, get_mut, into_inner}` methods.][58423] - [You can now call the `dbg!` macro without any parameters to print the file and line where it is called.][57847] - [In place ASCII case conversions are now up to 4× faster.][59283] e.g. `str::make_ascii_lowercase` - [`hash_map::{OccupiedEntry, VacantEntry}` now implement `Sync` and `Send`.][58369] Stabilized APIs --------------- - [`f32::copysign`] - [`f64::copysign`] - [`RefCell::replace_with`] - [`RefCell::map_split`] - [`ptr::hash`] - [`Range::contains`] - [`RangeFrom::contains`] - [`RangeTo::contains`] - [`RangeInclusive::contains`] - [`RangeToInclusive::contains`] - [`Option::copied`] Cargo ----- - [You can now set `cargo:rustc-cdylib-link-arg` at build time to pass custom linker arguments when building a `cdylib`.][cargo/6298] Its usage is highly platform specific. Misc ---- - [The Rust toolchain is now available natively for musl based distros.][58575] [59460]: https://github.com/rust-lang/rust/pull/59460/ [59464]: https://github.com/rust-lang/rust/pull/59464/ [59500]: https://github.com/rust-lang/rust/pull/59500/ [59512]: https://github.com/rust-lang/rust/pull/59512/ [59580]: https://github.com/rust-lang/rust/pull/59580/ [59283]: https://github.com/rust-lang/rust/pull/59283/ [59451]: https://github.com/rust-lang/rust/pull/59451/ [59076]: https://github.com/rust-lang/rust/pull/59076/ [58778]: https://github.com/rust-lang/rust/pull/58778/ [58717]: https://github.com/rust-lang/rust/pull/58717/ [58369]: https://github.com/rust-lang/rust/pull/58369/ [58423]: https://github.com/rust-lang/rust/pull/58423/ [58080]: https://github.com/rust-lang/rust/pull/58080/ [57847]: https://github.com/rust-lang/rust/pull/57847/ [58575]: https://github.com/rust-lang/rust/pull/58575 [cargo/6298]: https://github.com/rust-lang/cargo/pull/6298/ [`f32::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f32.html#method.copysign [`f64::copysign`]: https://doc.rust-lang.org/stable/std/primitive.f64.html#method.copysign [`RefCell::replace_with`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.replace_with [`RefCell::map_split`]: https://doc.rust-lang.org/stable/std/cell/struct.RefCell.html#method.map_split [`ptr::hash`]: https://doc.rust-lang.org/stable/std/ptr/fn.hash.html [`Range::contains`]: https://doc.rust-lang.org/std/ops/struct.Range.html#method.contains [`RangeFrom::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeFrom.html#method.contains [`RangeTo::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeTo.html#method.contains [`RangeInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.contains [`RangeToInclusive::contains`]: https://doc.rust-lang.org/std/ops/struct.RangeToInclusive.html#method.contains [`Option::copied`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.copied |
||
jperkin
|
3b9fdd0a7d | rust: Avoid ambiguous function call. | ||
he
|
2ce4ba47b4 | Sorry, messed up one patch; corrected version here. | ||
he
|
d91f121def |
Update rust to version 1.34.0.
Pkgsrc changes: * Bump required rust version to build to 1.33.0. * Adapt patches to changed file locations. * (I worry about 32-bit ports, now that Atomic64 apparently is First-Class; this has been built on NetBSD/amd64 so far) Upstream changes: Version 1.34.0 (2019-04-11) ========================== Language -------- - [You can now use `#[deprecated = "reason"]`][58166] as a shorthand for `#[deprecated(note = "reason")]`. This was previously allowed by mistake but had no effect. - [You can now accept token streams in `#[attr()]`,`#[attr[]]`, and `#[attr{}]` procedural macros.][57367] - [You can now write `extern crate self as foo;`][57407] to import your crate's root into the extern prelude. Compiler -------- - [You can now target `riscv64imac-unknown-none-elf` and `riscv64gc-unknown-none-elf`.][58406] - [You can now enable linker plugin LTO optimisations with `-C linker-plugin-lto`.][58057] This allows rustc to compile your Rust code into LLVM bitcode allowing LLVM to perform LTO optimisations across C/C++ FFI boundaries. - [You can now target `powerpc64-unknown-freebsd`.][57809] Libraries --------- - [The trait bounds have been removed on some of `HashMap<K, V, S>`'s and `HashSet<T, S>`'s basic methods.][58370] Most notably you no longer require the `Hash` trait to create an iterator. - [The `Ord` trait bounds have been removed on some of `BinaryHeap<T>`'s basic methods.][58421] Most notably you no longer require the `Ord` trait to create an iterator. - [The methods `overflowing_neg` and `wrapping_neg` are now `const` functions for all numeric types.][58044] - [Indexing a `str` is now generic over all types that implement `SliceIndex<str>`.][57604] - [`str::trim`, `str::trim_matches`, `str::trim_{start, end}`, and `str::trim_{start, end}_matches` are now `#[must_use]`][57106] and will produce a warning if their returning type is unused. - [The methods `checked_pow`, `saturating_pow`, `wrapping_pow`, and `overflowing_pow` are now available for all numeric types.][57873] These are equivalvent to methods such as `wrapping_add` for the `pow` operation. Stabilized APIs --------------- #### std & core * [`Any::type_id`] * [`Error::type_id`] * [`atomic::AtomicI16`] * [`atomic::AtomicI32`] * [`atomic::AtomicI64`] * [`atomic::AtomicI8`] * [`atomic::AtomicU16`] * [`atomic::AtomicU32`] * [`atomic::AtomicU64`] * [`atomic::AtomicU8`] * [`convert::Infallible`] * [`convert::TryFrom`] * [`convert::TryInto`] * [`iter::from_fn`] * [`iter::successors`] * [`num::NonZeroI128`] * [`num::NonZeroI16`] * [`num::NonZeroI32`] * [`num::NonZeroI64`] * [`num::NonZeroI8`] * [`num::NonZeroIsize`] * [`slice::sort_by_cached_key`] * [`str::escape_debug`] * [`str::escape_default`] * [`str::escape_unicode`] * [`str::split_ascii_whitespace`] #### std * [`Instant::checked_add`] * [`Instant::checked_sub`] * [`SystemTime::checked_add`] * [`SystemTime::checked_sub`] Cargo ----- - [You can now use alternative registries to crates.io.][cargo/6654] Misc ---- - [You can now use the `?` operator in your documentation tests without manually adding `fn main() -> Result<(), _> {}`.][56470] Compatibility Notes ------------------- - [`Command::before_exec` is now deprecated in favor of the unsafe method `Command::pre_exec`.][58059] - [Use of `ATOMIC_{BOOL, ISIZE, USIZE}_INIT` is now deprecated.][57425] As you can now use `const` functions in `static` variables. [58370]: https://github.com/rust-lang/rust/pull/58370/ [58406]: https://github.com/rust-lang/rust/pull/58406/ [58421]: https://github.com/rust-lang/rust/pull/58421/ [58166]: https://github.com/rust-lang/rust/pull/58166/ [58044]: https://github.com/rust-lang/rust/pull/58044/ [58057]: https://github.com/rust-lang/rust/pull/58057/ [58059]: https://github.com/rust-lang/rust/pull/58059/ [57809]: https://github.com/rust-lang/rust/pull/57809/ [57873]: https://github.com/rust-lang/rust/pull/57873/ [57604]: https://github.com/rust-lang/rust/pull/57604/ [57367]: https://github.com/rust-lang/rust/pull/57367/ [57407]: https://github.com/rust-lang/rust/pull/57407/ [57425]: https://github.com/rust-lang/rust/pull/57425/ [57106]: https://github.com/rust-lang/rust/pull/57106/ [56470]: https://github.com/rust-lang/rust/pull/56470/ [cargo/6654]: https://github.com/rust-lang/cargo/pull/6654/ [`Any::type_id`]: https://doc.rust-lang.org/std/any/trait.Any.html#tymethod.type_id [`Error::type_id`]: https://doc.rust-lang.org/std/error/trait.Error.html#tymethod.type_id [`atomic::AtomicI16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI16.html [`atomic::AtomicI32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI32.html [`atomic::AtomicI64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI64.html [`atomic::AtomicI8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicI8.html [`atomic::AtomicU16`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU16.html [`atomic::AtomicU32`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU32.html [`atomic::AtomicU64`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU64.html [`atomic::AtomicU8`]: https://doc.rust-lang.org/std/atomic/struct.AtomicU8.html [`convert::Infallible`]: https://doc.rust-lang.org/std/convert/enum.Infallible.html [`convert::TryFrom`]: https://doc.rust-lang.org/std/convert/trait.TryFrom.html [`convert::TryInto`]: https://doc.rust-lang.org/std/convert/trait.TryInto.html [`iter::from_fn`]: https://doc.rust-lang.org/std/iter/fn.from_fn.html [`iter::successors`]: https://doc.rust-lang.org/std/iter/fn.successors.html [`num::NonZeroI128`]: https://doc.rust-lang.org/std/num/struct.NonZeroI128.html [`num::NonZeroI16`]: https://doc.rust-lang.org/std/num/struct.NonZeroI16.html [`num::NonZeroI32`]: https://doc.rust-lang.org/std/num/struct.NonZeroI32.html [`num::NonZeroI64`]: https://doc.rust-lang.org/std/num/struct.NonZeroI64.html [`num::NonZeroI8`]: https://doc.rust-lang.org/std/num/struct.NonZeroI8.html [`num::NonZeroIsize`]: https://doc.rust-lang.org/std/num/struct.NonZeroIsize.html [`slice::sort_by_cached_key`]: https://doc.rust-lang.org/std/slice/fn.sort_by_cached_key [`str::escape_debug`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_debug [`str::escape_default`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_default [`str::escape_unicode`]: https://doc.rust-lang.org/std/primitive.str.html#method.escape_unicode [`str::split_ascii_whitespace`]: https://doc.rust-lang.org/std/primitive.str.html#method.split_ascii_whitespace [`Instant::checked_add`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_add [`Instant::checked_sub`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_sub [`SystemTime::checked_add`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_add [`SystemTime::checked_sub`]: https://doc.rust-lang.org/std/time/struct.SystemTime.html#method.checked_sub |
||
jperkin
|
91f14de68b |
rust: Fix another instance of the rand crate for SunOS.
While here convert some tabs->spaces that broke the test suite. |
||
rin
|
27ac447c9e |
Add patch to fix build for rust 1.33.0;
trim_left_matches has been superseded by trim_start_matches. |
||
he
|
b45f71963b |
Update rust to version 1.33.0.
Pkgsrc changes: * Bump required rust version to build to 1.32.0. * Adapt patches to changed file locations. * Since we now patch some more vendor/ modules, doctor the corresponding .cargo-checksum.json files accordingly Upstream changes: Version 1.33.0 (2019-02-28) ========================== Language -------- - [You can now use the `cfg(target_vendor)` attribute.][57465] E.g. `#[cfg(target_vendor="apple")] fn main() { println!("Hello Apple!"); }` - [Integer patterns such as in a match expression can now be exhaustive.][56362] E.g. You can have match statement on a `u8` that covers `0..=255` and you would no longer be required to have a `_ => unreachable!()` case. - [You can now have multiple patterns in `if let` and `while let` expressions.][57532] You can do this with the same syntax as a `match` expression. E.g. ```rust enum Creature { Crab(String), Lobster(String), Person(String), } fn main() { let state = Creature::Crab("Ferris"); if let Creature::Crab(name) | Creature::Person(name) = state { println!("This creature's name is: {}", name); } } ``` - [You can now have irrefutable `if let` and `while let` patterns.][57535] Using this feature will by default produce a warning as this behaviour can be unintuitive. E.g. `if let _ = 5 {}` - [You can now use `let` bindings, assignments, expression statements, and irrefutable pattern destructuring in const functions.][57175] - [You can now call unsafe const functions.][57067] E.g. ```rust const unsafe fn foo() -> i32 { 5 } const fn bar() -> i32 { unsafe { foo() } } ``` - [You can now specify multiple attributes in a `cfg_attr` attribute.][57332] E.g. `#[cfg_attr(all(), must_use, optimize)]` - [You can now specify a specific alignment with the `#[repr(packed)]` attribute.][57049] E.g. `#[repr(packed(2))] struct Foo(i16, i32);` is a struct with an alignment of 2 bytes and a size of 6 bytes. - [You can now import an item from a module as an `_`.][56303] This allows you to import a trait's impls, and not have the name in the namespace. E.g. ```rust use std::io::Read as _; // Allowed as there is only one `Read` in the module. pub trait Read {} ``` - [You may now use `Rc`, `Arc`, and `Pin` as method receivers][56805]. Compiler -------- - [You can now set a linker flavor for `rustc` with the `-Clinker-flavor` command line argument.][56351] - [The mininum required LLVM version has been bumped to 6.0.][56642] - [Added support for the PowerPC64 architecture on FreeBSD.][57615] - [The `x86_64-fortanix-unknown-sgx` target support has been upgraded to tier 2 support.][57130] Visit the [platform support][platform-support] page for information on Rust's platform support. - [Added support for the `thumbv7neon-linux-androideabi` and `thumbv7neon-unknown-linux-gnueabihf` targets.][56947] - [Added support for the `x86_64-unknown-uefi` target.][56769] Libraries --------- - [The methods `overflowing_{add, sub, mul, shl, shr}` are now `const` functions for all numeric types.][57566] - [The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}` are now `const` functions for all numeric types.][57105] - [The methods `is_positive` and `is_negative` are now `const` functions for all signed numeric types.][57105] - [The `get` method for all `NonZero` types is now `const`.][57167] - [The methods `count_ones`, `count_zeros`, `leading_zeros`, `trailing_zeros`, `swap_bytes`, `from_be`, `from_le`, `to_be`, `to_le` are now `const` for all numeric types.][57234] - [`Ipv4Addr::new` is now a `const` function][57234] Stabilized APIs --------------- - [`unix::FileExt::read_exact_at`] - [`unix::FileExt::write_all_at`] - [`Option::transpose`] - [`Result::transpose`] - [`convert::identity`] - [`pin::Pin`] - [`marker::Unpin`] - [`marker::PhantomPinned`] - [`Vec::resize_with`] - [`VecDeque::resize_with`] - [`Duration::as_millis`] - [`Duration::as_micros`] - [`Duration::as_nanos`] Cargo ----- - [Cargo should now rebuild a crate if a file was modified during the initial build.][cargo/6484] Compatibility Notes ------------------- - The methods `str::{trim_left, trim_right, trim_left_matches, trim_right_matches}` are now deprecated in the standard library, and their usage will now produce a warning. Please use the `str::{trim_start, trim_end, trim_start_matches, trim_end_matches}` methods instead. - The `Error::cause` method has been deprecated in favor of `Error::source` which supports downcasting. [55982]: https://github.com/rust-lang/rust/pull/55982/ [56303]: https://github.com/rust-lang/rust/pull/56303/ [56351]: https://github.com/rust-lang/rust/pull/56351/ [56362]: https://github.com/rust-lang/rust/pull/56362 [56642]: https://github.com/rust-lang/rust/pull/56642/ [56769]: https://github.com/rust-lang/rust/pull/56769/ [56805]: https://github.com/rust-lang/rust/pull/56805 [56947]: https://github.com/rust-lang/rust/pull/56947/ [57049]: https://github.com/rust-lang/rust/pull/57049/ [57067]: https://github.com/rust-lang/rust/pull/57067/ [57105]: https://github.com/rust-lang/rust/pull/57105 [57130]: https://github.com/rust-lang/rust/pull/57130/ [57167]: https://github.com/rust-lang/rust/pull/57167/ [57175]: https://github.com/rust-lang/rust/pull/57175/ [57234]: https://github.com/rust-lang/rust/pull/57234/ [57332]: https://github.com/rust-lang/rust/pull/57332/ [57465]: https://github.com/rust-lang/rust/pull/57465/ [57532]: https://github.com/rust-lang/rust/pull/57532/ [57535]: https://github.com/rust-lang/rust/pull/57535/ [57566]: https://github.com/rust-lang/rust/pull/57566/ [57615]: https://github.com/rust-lang/rust/pull/57615/ [cargo/6484]: https://github.com/rust-lang/cargo/pull/6484/ [`unix::FileExt::read_exact_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.read_exact_at [`unix::FileExt::write_all_at`]: https://doc.rust-lang.org/std/os/unix/fs/trait.FileExt.html#method.write_all_at [`Option::transpose`]: https://doc.rust-lang.org/std/option/enum.Option.html#method.transpose [`Result::transpose`]: https://doc.rust-lang.org/std/result/enum.Result.html#method.transpose [`convert::identity`]: https://doc.rust-lang.org/std/convert/fn.identity.html [`pin::Pin`]: https://doc.rust-lang.org/std/pin/struct.Pin.html [`marker::Unpin`]: https://doc.rust-lang.org/stable/std/marker/trait.Unpin.html [`marker::PhantomPinned`]: https://doc.rust-lang.org/nightly/std/marker/struct.PhantomPinned.html [`Vec::resize_with`]: https://doc.rust-lang.org/std/vec/struct.Vec.html#method.resize_with [`VecDeque::resize_with`]: https://doc.rust-lang.org/std/collections/struct.VecDeque.html#method.resize_with [`Duration::as_millis`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_millis [`Duration::as_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_micros [`Duration::as_nanos`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_nanos [platform-support]: https://forge.rust-lang.org/platform-support.html |
||
jperkin
|
c68f8c9626 | rust: Put back SunOS fix lost in previous update. | ||
ryoon
|
f97660dda2 |
Update to 1.32.0
Changelog: Version 1.32.0 (2019-01-17) ========================== Language -------- #### 2018 edition - [You can now use the `?` operator in macro definitions.][56245] The `?` operator allows you to specify zero or one repetitions similar to the `*` and `+` operators. - [Module paths with no leading keyword like `super`, `self`, or `crate`, will now always resolve to the item (`enum`, `struct`, etc.) available in the module if present, before resolving to a external crate or an item the prelude.][56759] E.g. ```rust enum Color { Red, Green, Blue } use Color::*; ``` #### All editions - [You can now match against `PhantomData<T>` types.][55837] - [You can now match against literals in macros with the `literal` specifier.][56072] This will match against a literal of any type. E.g. `1`, `'A'`, `"Hello World"` - [Self can now be used as a constructor and pattern for unit and tuple structs.][56365] E.g. ```rust struct Point(i32, i32); impl Point { pub fn new(x: i32, y: i32) -> Self { Self(x, y) } pub fn is_origin(&self) -> bool { match self { Self(0, 0) => true, _ => false, } } } ``` - [Self can also now be used in type definitions.][56366] E.g. ```rust enum List<T> where Self: PartialOrd<Self> // can write `Self` instead of `List<T>` { Nil, Cons(T, Box<Self>) // likewise here } ``` - [You can now mark traits with `#[must_use]`.][55663] This provides a warning if a `impl Trait` or `dyn Trait` is returned and unused in the program. Compiler -------- - [The default allocator has changed from jemalloc to the default allocator on your system.][55238] The compiler itself on Linux & macOS will still use jemalloc, but programs compiled with it will use the system allocator. - [Added the `aarch64-pc-windows-msvc` target.][55702] Libraries --------- - [`PathBuf` now implements `FromStr`.][55148] - [`Box<[T]>` now implements `FromIterator<T>`.][55843] - [The `dbg!` macro has been stabilized.][56395] This macro enables you to easily debug expressions in your rust program. E.g. ```rust let a = 2; let b = dbg!(a * 2) + 1; // ^-- prints: [src/main.rs:4] a * 2 = 4 assert_eq!(b, 5); ``` The following APIs are now `const` functions and can be used in a `const` context. - [`Cell::as_ptr`] - [`UnsafeCell::get`] - [`char::is_ascii`] - [`iter::empty`] - [`ManuallyDrop::new`] - [`ManuallyDrop::into_inner`] - [`RangeInclusive::start`] - [`RangeInclusive::end`] - [`NonNull::as_ptr`] - [`slice::as_ptr`] - [`str::as_ptr`] - [`Duration::as_secs`] - [`Duration::subsec_millis`] - [`Duration::subsec_micros`] - [`Duration::subsec_nanos`] - [`CStr::as_ptr`] - [`Ipv4Addr::is_unspecified`] - [`Ipv6Addr::new`] - [`Ipv6Addr::octets`] Stabilized APIs --------------- - [`i8::to_be_bytes`] - [`i8::to_le_bytes`] - [`i8::to_ne_bytes`] - [`i8::from_be_bytes`] - [`i8::from_le_bytes`] - [`i8::from_ne_bytes`] - [`i16::to_be_bytes`] - [`i16::to_le_bytes`] - [`i16::to_ne_bytes`] - [`i16::from_be_bytes`] - [`i16::from_le_bytes`] - [`i16::from_ne_bytes`] - [`i32::to_be_bytes`] - [`i32::to_le_bytes`] - [`i32::to_ne_bytes`] - [`i32::from_be_bytes`] - [`i32::from_le_bytes`] - [`i32::from_ne_bytes`] - [`i64::to_be_bytes`] - [`i64::to_le_bytes`] - [`i64::to_ne_bytes`] - [`i64::from_be_bytes`] - [`i64::from_le_bytes`] - [`i64::from_ne_bytes`] - [`i128::to_be_bytes`] - [`i128::to_le_bytes`] - [`i128::to_ne_bytes`] - [`i128::from_be_bytes`] - [`i128::from_le_bytes`] - [`i128::from_ne_bytes`] - [`isize::to_be_bytes`] - [`isize::to_le_bytes`] - [`isize::to_ne_bytes`] - [`isize::from_be_bytes`] - [`isize::from_le_bytes`] - [`isize::from_ne_bytes`] - [`u8::to_be_bytes`] - [`u8::to_le_bytes`] - [`u8::to_ne_bytes`] - [`u8::from_be_bytes`] - [`u8::from_le_bytes`] - [`u8::from_ne_bytes`] - [`u16::to_be_bytes`] - [`u16::to_le_bytes`] - [`u16::to_ne_bytes`] - [`u16::from_be_bytes`] - [`u16::from_le_bytes`] - [`u16::from_ne_bytes`] - [`u32::to_be_bytes`] - [`u32::to_le_bytes`] - [`u32::to_ne_bytes`] - [`u32::from_be_bytes`] - [`u32::from_le_bytes`] - [`u32::from_ne_bytes`] - [`u64::to_be_bytes`] - [`u64::to_le_bytes`] - [`u64::to_ne_bytes`] - [`u64::from_be_bytes`] - [`u64::from_le_bytes`] - [`u64::from_ne_bytes`] - [`u128::to_be_bytes`] - [`u128::to_le_bytes`] - [`u128::to_ne_bytes`] - [`u128::from_be_bytes`] - [`u128::from_le_bytes`] - [`u128::from_ne_bytes`] - [`usize::to_be_bytes`] - [`usize::to_le_bytes`] - [`usize::to_ne_bytes`] - [`usize::from_be_bytes`] - [`usize::from_le_bytes`] - [`usize::from_ne_bytes`] Cargo ----- - [You can now run `cargo c` as an alias for `cargo check`.][cargo/6218] - [Usernames are now allowed in alt registry URLs.][cargo/6242] Misc ---- - [`libproc_macro` has been added to the `rust-src` distribution.][55280] Compatibility Notes ------------------- - [The argument types for AVX's `_mm256_stream_si256`, `_mm256_stream_pd`, `_mm256_stream_ps`][55610] have been changed from `*const` to `*mut` as the previous implementation was unsound. [55148]: https://github.com/rust-lang/rust/pull/55148/ [55238]: https://github.com/rust-lang/rust/pull/55238/ [55280]: https://github.com/rust-lang/rust/pull/55280/ [55610]: https://github.com/rust-lang/rust/pull/55610/ [55663]: https://github.com/rust-lang/rust/pull/55663/ [55702]: https://github.com/rust-lag/rust/pull/55702/ [55837]: https://github.com/rust-lang/rust/pull/55837/ [55843]: https://github.com/rust-lang/rust/pull/55843/ [56072]: https://github.com/rust-lang/rust/pull/56072/ [56245]: https://github.com/rust-lang/rust/pull/56245/ [56365]: https:/ttps://github.com/rust-lang/rust/pull/56395/ [56759]: https://github.com/rust-lang/rust/pull/56759/ [cargo/6218]: https://github.com/rust-lang/cargo/pull/6218/ [cargo/6242]: https://github.com/rust-lang/cargo/pull/6242/ [`CStr::as_ptr`]: https://doc.rust-`Duration::as_secs`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.as_secs [`Duration::subsec_micros`]: https://doc.rust-lang.org/std/time/struct.Duration.html#method.subsec_micros [`Duration::subsec_millis`]: https://doc.rust-lang.org/sct.Duration.html#method.subsec_nanos [`Ipv4Addr::is_unspecified`]: https://doc.rust-lang.org/std/net/struct.Ipv4Addr.html#method.is_unspecified [`Ipv6Addr::new`]: https://doc.rust-lang.org/std/net/struct.Ipv6Addr.html#method.new [`Ipv6Addr::octets`]: httpw`]: https://doc.rust-lang.org/std/mem/struct.ManuallyDrop.html#method.new [`NonNull::as_ptr`]: https://doc.rust-lang.org/std/ptr/struct.NonNull.html#method.as_ptr [`RangeInclusive::end`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.end [`RangeInclusive::start`]: https://doc.rust-lang.org/std/ops/struct.RangeInclusive.html#method.start [`UnsafeCell::get`]: https://doc.rust-lang.org/std/cell/struct.UnsafeCell.html#method.get [`slice::as_ptr`]: https://doc.rust-lang.org/std/primitive.slice.html#method.as_ptr [`char::is_ascii`]: https://doc.rust-lang.org/std/primitive.char.html#method.is_ascii [`i128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_be_bytes [`i128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_le_bytes [`i128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.from_ne_bytes [`i128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_be_bytes [`i128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_le_bytes [`i128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i128.html#method.to_ne_bytes [`i16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_be_bytes [`i16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_le_bytes [`i16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.from_ne_bytes [`i16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_be_bytes [`i16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_le_bytes [`i16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i16.html#method.to_ne_bytes [`i32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_be_bytes [`i32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_le_bytes [`i32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.from_ne_bytes [`i32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_be_bytes [`i32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_le_bytes [`i32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i32.html#method.to_ne_bytes [`i64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_be_bytes [`i64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_le_bytes [`i64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.from_ne_bytes [`i64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_be_bytes [`i64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_le_bytes [`i64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i64.html#method.to_ne_bytes [`i8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_be_bytes [`i8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_le_bytes [`i8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.from_ne_bytes [`i8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_be_bytes [`i8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_le_bytes [`i8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.i8.html#method.to_ne_bytes [`isize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_be_bytes [`isize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_le_bytes [`isize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.from_ne_bytes [`isize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_be_bytes [`isize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_le_bytes [`isize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.isize.html#method.to_ne_bytes [`iter::empty`]: https://doc.rust-lang.org/std/iter/fn.empty.html [`str::as_ptr`]: https://doc.rust-lang.org/std/primitive.str.html#method.as_ptr [`u128::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_be_bytes [`u128::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_le_bytes [`u128::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.from_ne_bytes [`u128::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_be_bytes [`u128::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_le_bytes [`u128::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u128.html#method.to_ne_bytes [`u16::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_be_bytes [`u16::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_le_bytes [`u16::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.from_ne_bytes [`u16::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_be_bytes [`u16::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_le_bytes [`u16::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u16.html#method.to_ne_bytes [`u32::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_be_bytes [`u32::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_le_bytes [`u32::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.from_ne_bytes [`u32::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_be_bytes [`u32::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_le_bytes [`u32::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u32.html#method.to_ne_bytes [`u64::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_be_bytes [`u64::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_le_bytes [`u64::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.from_ne_bytes [`u64::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_be_bytes [`u64::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_le_bytes [`u64::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u64.html#method.to_ne_bytes [`u8::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_be_bytes [`u8::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_le_bytes [`u8::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.from_ne_bytes [`u8::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_be_bytes [`u8::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_le_bytes [`u8::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ne_bytes [`usize::from_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_be_bytes [`usize::from_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_le_bytes [`usize::from_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.from_ne_bytes [`usize::to_be_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_be_bytes [`usize::to_le_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_le_bytes [`usize::to_ne_bytes`]: https://doc.rust-lang.org/stable/std/primitive.usize.html#method.to_ne_bytes |
||
tnn
|
d3f4529f8e |
rust: add some kludges to better support NetBSD HEAD-llvm
1) bootstrap rustc adds -lgcc_s when linking -> Dropped with a BUILDLINK_TRANSFORM 2) bootstrap rustc has shared linkage to libgcc_s.so.1 -> Until upstream changes this to static linkage, we look for libgcc_s.so.1 in ${FILESDIR} where the user must place it manually. 3) newly built rustc adds -lstdc++ instead of -lc++ when linking llvm -> fixed with patch-src_librustc__llvm_build.rs 4) newly built rustc adds -lgcc_s when linking -> fixed with patch-src_libunwind_build.rs |
||
he
|
80337c9066 |
Upgrade rust to version 1.31.1.
Pkgsrc changes: * Sadly, I had to reinstate the "make tar files" rust code to make it possible to build cross-compiled bootstrap kits. * Add an adjustable "BUILD_TARGET", "dist" for cross-building a bootstrap kit, "build" for a normal native build. * New bootstrap kits built for NetBSD/powerpc, NetBSD/earmv7hf, and NetBSD/sparc64 version 1.31.1. * gcc-wrap script amended to also drop -Wl,--enable-new-dtags (so it could be used outside pkgsrc) * Worked around use of AtomicU64 in release build tool (ugly band-aid patch). Some platforms lack support for that type and associated operations. Upstream changes: - [Fix Rust failing to build on `powerpc-unknown-netbsd`][56562] - [Fix broken go-to-definition in RLS][rls/1171] - [Fix infinite loop on hover in RLS][rls/1170] [56562]: https://github.com/rust-lang/rust/pull/56562 [rls/1171]: https://github.com/rust-lang/rls/issues/1171 [rls/1170]: https://github.com/rust-lang/rls/pull/1170 |
||
adam
|
7d3481ecc9 |
rust: speed-up building; clean-ups
- 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 |
||
martin
|
7f1d7facf4 |
Add patch from jakllsch (not merged upstream yet) to fix some pthread/
mutex types for some NetBSD architectures. |
||
jperkin
|
03ef6d20af |
lang/rust: Various fixes.
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. |
||
he
|
cdf2cbcc2a |
Upgrade rust to version 1.30.0.
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 |
||
he
|
4e501e7afe |
Upgrade rust to version 1.29.2.
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. |
||
he
|
5b1797db7d |
Add the bits required to build rust on NetBSD/powerpc ports, and
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. |
||
minskim
|
d6cee94406 |
lang/rust: Make llvm build on Darwin
Patch from lang/llvm. |
||
jperkin
|
f2a8d533f2 |
rust: Update to 1.29.0.
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 |
||
jperkin
|
d70218ab66 |
rust: Update to version 1.28.0.
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"); } } ``` |
||
ryoon
|
ba5a4c2061 | Add missing patch to fix build on NetBSD | ||
ryoon
|
cb24e70d0f |
Update to 1.27.0
* 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. |
||
jperkin
|
3228ea0b64 | rust: Restore SunOS support. | ||
ryoon
|
5bd5f22e6f |
Update to 1.26.0
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. |
||
ryoon
|
d5296f822f |
Update to 1.25.0
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]. |
||
triaxx
|
862e6d4a6d | Enable FreeBSD support | ||
ryoon
|
f166e97b4c |
Update to 1.23.0
* Disable Solaris/SunOS suppprt for a while Changelog: # What's in 1.23.0 stable New year, new Rust! For our first improvement today, we now avoid some unnecessary copies in certain situations. We've seen memory usage of using rustc to drop 5-10% with this change; it may be different with your programs. The documentation team has been on a long journey to move rustdoc to use CommonMark. Previously, rustdoc never guaranteed which markdown rendering engine it used, but we're finally committing to CommonMark. As part of this release, we render the documentation with our previous renderer, Hoedown, but also render it with a CommonMark compliant renderer, and warn if there are any differences. There should be a way for you to modify the syntax you use to render correctly under both; we're not aware of any situations where this is impossible. Docs team member Guillaume Gomez has written a blog post showing some common differences and how to solve them. In a future release, we will switch to using the CommonMark renderer by default. This warning landed in nightly in May of last year, and has been on by default since October of last year, so many crates have already fixed any issues that they've found. In other documentation news, historically, Cargo's docs have been a bit strange. Rather than being on doc.rust-lang.org, they've been at doc.crates.io. With this release, that's changing. You can now find Cargo's docs at doc.rust-lang.org/cargo. Additionally, they've been converted to the same format as our other long-form documentation. We'll be adding a redirect from doc.crates.io to this page, and you can expect to see more improvements and updates to Cargo's docs throughout the year. See the detailed release notes for more. ## Library stabilizations As of Rust 1.0, a trait named AsciiExt existed to provide ASCII related functionality on u8, char, [u8], and str. To use it, you'd write code like this: use std::ascii::AsciiExt; let ascii = 'a'; let non_ascii = '❤'; let int_ascii = 97; assert!(ascii.is_ascii()); assert!(!non_ascii.is_ascii()); assert!(int_ascii.is_ascii()); In Rust 1.23, these methods are now defined directly on those types, and so you no longer need to import the trait. Thanks to our stability guarantees, this trait still exists, so if you'd like to still support Rust versions before Rust 1.23, you can do this: #[allow(unused_imports)] use std::ascii::AsciiExt; ...to suppress the related warning. Once you drop support for older Rusts, you can remove both lines, and everything will continue to work. Additionally, a few new APIs were stabilized this release: The various std::sync::atomic types now implement From their non-atomic types. For example, let x = AtomicBool::from(true);. () now implements FromIterator<()>; check the PR for a neat use-case. RwLock<T> has had its Send restriction lifted See the detailed release notes for more. ## Cargo features cargo check can now check your unit tests. cargo uninstall can now uninstall more than one package in one command. |
||
jperkin
|
a4a9aa4a7a | rust: Restore SunOS support. | ||
maya
|
fb99f3af0a |
rust: don't filter out optimization flags. improves build time.
from a commit by semarie@openbsd |
||
ryoon
|
c0971a3bf2 |
Update to 1.22.1
* Disable SunOS support for a while Changelog: Version 1.22.1 (2017-11-22) Update Cargo to fix an issue with macOS 10.13 "High Sierra" Version 1.22.0 (2017-11-22) Language non_snake_case lint now allows extern no-mangle functions Now accepts underscores in unicode escapes T op= &T now works for numeric types. eg. let mut x = 2; x += &8; types that impl Drop are now allowed in const and static types Compiler rustc now defaults to having 16 codegen units at debug on supported platforms. rustc will no longer inline in codegen units when compiling for debug This should decrease compile times for debug builds. strict memory alignment now enabled on ARMv6 Remove support for the PNaCl target le32-unknown-nacl Libraries Allow atomic operations up to 32 bits on armv5te_unknown_linux_gnueabi Box<Error> now impls From<Cow<str>> std::mem::Discriminant is now guaranteed to be Send + Sync fs::copy now returns the length of the main stream on NTFS. Properly detect overflow in Instant += Duration. impl Hasher for {&mut Hasher, Box<Hasher>} impl fmt::Debug for SplitWhitespace. Option<T> now impls Try This allows for using ? with Option types. Stabilized APIs Cargo Cargo will now build multi file examples in subdirectories of the examples folder that have a main.rs file. Changed [root] to [package] in Cargo.lock Packages with the old format will continue to work and can be updated with cargo update. Now supports vendoring git repositories Misc libbacktrace is now available on Apple platforms. Stabilised the compile_fail attribute for code fences in doc-comments. This now lets you specify that a given code example will fail to compile. Compatibility Notes The minimum Android version that rustc can build for has been bumped to 4.0 from 2.3 Allowing T op= &T for numeric types has broken some type inference cases |
||
jperkin
|
f217fd513f |
rust: Restore SunOS support. Switch back to configure script.
No changes intended on other platforms, the configure script arguments should be identical to those previously found in config.toml. Doing it this way makes it a lot easier to have per-OS configuration. |
||
ryoon
|
8a89f61f7f |
Update to 1.20.0
* Disable SunOS/Solaris support because newer bootstrap is not available * Include Rust libraries and Cargo Changelog: Version 1.20.0 (2017-08-31) Language Associated constants are now stabilised. A lot of macro bugs are now fixed. Compiler Struct fields are now properly coerced to the expected field type. Enabled wasm LLVM backend WASM can now be built with the wasm32-experimental-emscripten target. Changed some of the error messages to be more helpful. Add support for RELRO(RELocation Read-Only) for platforms that support it. rustc now reports the total number of errors on compilation failure previously this was only the number of errors in the pass that failed. Expansion in rustc has been sped up 29x. added msp430-none-elf target. rustc will now suggest one-argument enum variant to fix type mismatch when applicable Fixes backtraces on Redox rustc now identifies different versions of same crate when absolute paths of different types match in an error message. Libraries Relaxed Debug constraints on {HashMap,BTreeMap}::{Keys,Values}. Impl PartialEq, Eq, PartialOrd, Ord, Debug, Hash for unsized tuples. Impl fmt::{Display, Debug} for Ref, RefMut, MutexGuard, RwLockReadGuard, RwLockWriteGuard Impl Clone for DefaultHasher. Impl Sync for SyncSender. Impl FromStr for char Fixed how {f32, f64}::{is_sign_negative, is_sign_positive} handles NaN. allow messages in the unimplemented!() macro. ie. unimplemented!("Waiting for 1.21 to be stable") pub(restricted) is now supported in the thread_local! macro. Upgrade to Unicode 10.0.0 Reimplemented {f32, f64}::{min, max} in Rust instead of using CMath. Skip the main thread's manual stack guard on Linux Iterator::nth for ops::{Range, RangeFrom} is now done in O(1) time #[repr(align(N))] attribute max number is now 2^31 - 1. This was previously 2^15. {OsStr, Path}::Display now avoids allocations where possible Stabilized APIs CStr::into_c_string CString::as_c_str CString::into_boxed_c_str Chain::get_mut Chain::get_ref Chain::into_inner Option::get_or_insert_with Option::get_or_insert OsStr::into_os_string OsString::into_boxed_os_str Take::get_mut Take::get_ref Utf8Error::error_len char::EscapeDebug char::escape_debug compile_error! f32::from_bits f32::to_bits f64::from_bits f64::to_bits mem::ManuallyDrop slice::sort_unstable_by_key slice::sort_unstable_by slice::sort_unstable str::from_boxed_utf8_unchecked str::as_bytes_mut str::as_bytes_mut str::from_utf8_mut str::from_utf8_unchecked_mut str::get_mut str::get_unchecked_mut str::get_unchecked str::get str::into_boxed_bytes Cargo Cargo API token location moved from ~/.cargo/config to ~/.cargo/credentials. Cargo will now build main.rs binaries that are in sub-directories of src/bin. ie. Having src/bin/server/main.rs and src/bin/client/main.rs generates target/debug/server and target/debug/client You can now specify version of a binary when installed through cargo install using --vers. Added --no-fail-fast flag to cargo to run all benchmarks regardless of failure. Changed the convention around which file is the crate root. The include/exclude property in Cargo.toml now accepts gitignore paths instead of glob patterns. Glob patterns are now deprecated. Compatibility Notes Functions with 'static in their return types will now not be as usable as if they were using lifetime parameters instead. The reimplementation of {f32, f64}::is_sign_{negative, positive} now takes the sign of NaN into account where previously didn't. Version 1.19.0 (2017-07-20) Language Numeric fields can now be used for creating tuple structs. RFC 1506 For example struct Point(u32, u32); let x = Point { 0: 7, 1: 0 };. Macro recursion limit increased to 1024 from 64. Added lint for detecting unused macros. loop can now return a value with break. RFC 1624 For example: let x = loop { break 7; }; C compatible unions are now available. RFC 1444 They can only contain Copy types and cannot have a Drop implementation. Example: union Foo { bar: u8, baz: usize } Non capturing closures can now be coerced into fns, RFC 1558 Example: let foo: fn(u8) -> u8 = |v: u8| { v }; Compiler Add support for bootstrapping the Rust compiler toolchain on Android. Change arm-linux-androideabi to correspond to the armeabi official ABI. If you wish to continue targeting the armeabi-v7a ABI you should use --target armv7-linux-androideabi. Fixed ICE when removing a source file between compilation sessions. Minor optimisation of string operations. Compiler error message is now aborting due to previous error(s) instead of aborting due to N previous errors This was previously inaccurate and would only count certain kinds of errors. The compiler now supports Visual Studio 2017 The compiler is now built against LLVM 4.0.1 by default Added a lot of new error codes Added target-feature=+crt-static option RFC 1721 Which allows libraries with C Run-time Libraries(CRT) to be statically linked. Fixed various ARM codegen bugs Libraries String now implements FromIterator<Cow<'a, str>> and Extend<Cow<'a, str>> Vec now implements From<&mut [T]> Box<[u8]> now implements From<Box<str>> SplitWhitespace now implements Clone [u8]::reverse is now 5x faster and [u16]::reverse is now 1.5x faster eprint! and eprintln! macros added to prelude. Same as the print! macros, but for printing to stderr. Stabilized APIs OsString::shrink_to_fit cmp::Reverse Command::envs thread::ThreadId Cargo Build scripts can now add environment variables to the environment the crate is being compiled in. Example: println!("cargo:rustc-env=FOO=bar"); Subcommands now replace the current process rather than spawning a new child process Workspace members can now accept glob file patterns Added --all flag to the cargo bench subcommand to run benchmarks of all the members in a given workspace. Updated libssh2-sys to 0.2.6 Target directory path is now in the cargmetadata Cargo no longer checks out a local working directory for the crates.io index This should provide smaller file size for the registry, and improve cloning times, especially on Windows machines. Added an --exclude option for excluding certai using the --all option Cargo will now automatically retry when receiving a 5xx error from crates.io The --features option now accepts multiple comma or space delimited values. Added support for custom target specific runners Misc Added ow prefer to download rust packages with XZ compression over GZip packages. Added the ability to escape # in rust documentation By adding additional #'s ie. ## is now # Compatibility Notes MutexGuard<T> may only be Sync if T is Sync. -Z flagning for a year previous to this. As a result of the -Z flag change, the cargo-check plugin no longer works. Users should migrate to the built-in check command, which has been available since 1.16. Ending a float literal with ._ is now a hard erro use ::self::foo; is now a hard error. self paths are always relative while the :: prefix makes a path absolute, but was ignored and the path was relative regardless. Floating point constants in match patterns is now a hard error This was previously ts that don't derive PartialEq & Eq used match patterns is now a hard error This was previously a warning. Lifetimes named '_ are no longer allowed. This was previously a warning. From the pound escape, lines consisting of multiple #s are now visible It is an error to reexport private enum variants. This is known to break a number of crates that depend on an older version of mustache. On Windows, if VCINSTALLDIR is set incorrectly, rustc will try to use it to find the linker, and the build will fail where it did not previously Version 1.18.0 (2017-06-08) Language Stabilize pub(restricted) pub can now accept a module path to make the item visible to just that module tree. Also accepts the keyword crate to make something public to the whole crate but not users of the library. Example: pub(crate) mod utils;. RFC 1422. Stabilize #![windows_subsystem] attribute conservative exposure of the /SUBSYSTEM linker flag on Windows platforms. RFC 1665. Refactor of trait object type parsing Now ty in macros can accept types like Write + Send, trailing + are now supported in trait objects, and better error reporting for trait objects starting with ?Sized. 0e+10 is now a valid floating point literal Now warns if you bind a lifetime parameter to 'static Tuples, Enum variant fields, and structs with no repr attribute or with #[repr(Rust)] are reordered to minimize padding and produce a smaller representation in some cases. Compiler rustc can now emit mir with --emit mir Improved LLVM IR for trivial functions Added explanation for E0090(Wrong number of lifetimes are supplied) rustc compilation is now 15%-20% faster Thanks to optimisation opportunities found through profiling Improved backtrace formatting when panicking Libraries Specialized Vec::from_iter being passed vec::IntoIter if the iterator hasn't been advanced the original Vec is reassembled with no actual iteration or reallocation. Simplified HashMap Bucket interface provides performance improvements for iterating and cloning. Specialize Vec::from_elem to use calloc Fixed Race condition in fs::create_dir_all No longer caching stdio on Windows Optimized insertion sort in slice insertion sort in some cases 2.50%~ faster and in one case now 12.50% faster. Optimized AtomicBool::fetch_nand Stabilized APIs Child::try_wait HashMap::retain HashSet::retain PeekMut::pop TcpStream::peek UdpSocket::peek UdpSocket::peek_from Cargo Added partial Pijul support Pijul is a version control system in Rust. You can now create new cargo projects with Pijul using cargo new --vcs pijul Now always emits build script warnings for crates that fail to build Added Android build support Added --bins and --tests flags now you can build all programs of a certain type, for example cargo build --bins will build all binaries. Added support for haiku Misc rustdoc can now use pulldown-cmark with the --enable-commonmark flag Added rust-winbg script for better debugging on Windows Rust now uses the official cross compiler for NetBSD rustdoc now accepts # at the start of files Fixed jemalloc support for musl Compatibility Notes Changes to how the 0 flag works in format! Padding zeroes are now always placed after the sign if it exists and before the digits. With the # flag the zeroes are placed after the prefix and before the digits. Due to the struct field optimisation, using transmute on structs that have no repr attribute or #[repr(Rust)] will no longer work. This has always been undefined behavior, but is now more likely to break in practice. The refactor of trait object type parsing fixed a bug where + was receiving the wrong priority parsing things like &for<'a> Tr<'a> + Send as &(for<'a> Tr<'a> + Send) instead of (&for<'a> Tr<'a>) + Send Overlapping inherent impls are now a hard error PartialOrd and Ord must agree on the ordering. rustc main.rs -o out --emit=asm,llvm-ir Now will output out.asm and out.ll instead of only one of the filetypes. calling a function that returns Self will no longer work when the size of Self cannot be statically determined. rustc now builds with a "pthreads" flavour of MinGW for Windows GNU this has caused a few regressions namely: Changed the link order of local static/dynamic libraries (respecting the order on given rather than having the compiler reorder). Changed how MinGW is linked, native code linked to dynamic libraries may require manually linking to the gcc support library (for the native code itself) Version 1.17.0 (2017-04-27) Language The lifetime of statics and consts defaults to 'static. RFC 1623 Fields of structs may be initialized without duplicating the field/variable names. RFC 1682 Self may be included in the where clause of impls. RFC 1647 When coercing to an unsized type lifetimes must be equal. That is, there is no subtyping between T and U when T: Unsize<U>. For example, coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix. Values passed to the indexing operator, [], automatically coerce Static variables may contain references to other statics Compiler Exit quickly on only --emit dep-info Make -C relocation-model more correctly determine whether the linker creates a position-independent executable Add -C overflow-checks to directly control whether integer overflow panics The rustc type checker now checks items on demand instead of in a single in-order pass. This is mostly an internal refactoring in support of future work, including incremental type checking, but also resolves RFC 1647, allowing Self to appear in impl where clauses. Optimize vtable loads Turn off vectorization for Emscripten targets Provide suggestions for unknown macros imported with use Fix ICEs in path resolution Strip exception handling code on Emscripten when panic=abort Add clearer error message using &str + &str Stabilized APIs Arc::into_raw Arc::from_raw Arc::ptr_eq Rc::into_raw Rc::from_raw Rc::ptr_eq Ordering::then Ordering::then_with BTreeMap::range BTreeMap::range_mut collections::Bound process::abort ptr::read_unaligned ptr::write_unaligned Result::expect_err Cell::swap Cell::replace Cell::into_inner Cell::take Libraries BTreeMap and BTreeSet can iterate over ranges Cell can store non-Copy types. RFC 1651 String implements FromIterator<&char> Box implements a number of new conversions: From<Box<str>> for String, From<Box<[T]>> for Vec<T>, From<Box<CStr>> for CString, From<Box<OsStr>> for OsString, From<Box<Path>> for PathBuf, Into<Box<str>> for String, Into<Box<[T]>> for Vec<T>, Into<Box<CStr>> for CString, Into<Box<OsStr>> for OsString, Into<Box<Path>> for PathBuf, Default for Box<str>, Default for Box<CStr>, Default for Box<OsStr>, From<&CStr> for Box<CStr>, From<&OsStr> for Box<OsStr>, From<&Path> for Box<Path> ffi::FromBytesWithNulError implements Error and Display Specialize PartialOrd<A> for [A] where A: Ord Slightly optimize slice::sort Add ToString trait specialization for Cow<'a, str> and String Box<[T]> implements From<&[T]> where T: Copy, Box<str> implements From<&str> IpAddr implements From for various arrays. SocketAddr implements From<(I, u16)> where I: Into<IpAddr> format! estimates the needed capacity before writing a string Support unprivileged symlink creation in Windows PathBuf implements Default Implement PartialEq<[A]> for VecDeque<A> HashMap resizes adaptively to guard against DOS attacks and poor hash functions. Cargo Add cargo check --all Add an option to ignore SSL revocation checking Add cargo run --package Add required_features Assume build.rs is a build script Find workspace via workspace_root link in containing member Misc Documentation is rendered with mdbook instead of the obsolete, in-tree rustbook The "Unstable Book" documents nightly-only features Improve the style of the sidebar in rustdoc output Configure build correctly on 64-bit CPU's with the armhf ABI Fix MSP430 breakage due to i128 Preliminary Solaris/SPARCv9 support rustc is linked statically on Windows MSVC targets, allowing it to run without installing the MSVC runtime. rustdoc --test includes file names in test names This release includes builds of std for sparc64-unknown-linux-gnu, aarch64-unknown-linux-fuchsia, and x86_64-unknown-linux-fuchsia. Initial support for aarch64-unknown-freebsd Initial support for i686-unknown-netbsd This release no longer includes the old makefile build system. Rust is built with a custom build system, written in Rust, and with Cargo. Add Debug implementations for libcollection structs TypeId implements PartialOrd and Ord --test-threads=0 produces an error rustup installs documentation by default The Rust source includes NatVis visualizations. These can be used by WinDbg and Visual Studio to improve the debugging experience. Compatibility Notes Rust 1.17 does not correctly detect the MSVC 2017 linker. As a workaround, either use MSVC 2015 or run vcvars.bat. When coercing to an unsized type lifetimes must be equal. That is, disallow subtyping between T and U when T: Unsize<U>, e.g. coercing &mut [&'a X; N] to &mut [&'b X] requires 'a be equal to 'b. Soundness fix. format! and Display::to_string panic if an underlying formatting implementation returns an error. Previously the error was silently ignored. It is incorrect for write_fmt to return an error when writing to a string. In-tree crates are verified to be unstable. Previously, some minor crates were marked stable and could be accessed from the stable toolchain. Rust git source no longer includes vendored crates. Those that need to build with vendored crates should build from release tarballs. Fix inert attributes from proc_macro_derives During crate resolution, rustc prefers a crate in the sysroot if two crates are otherwise identical. Unlikely to be encountered outside the Rust build system. Fixed bugs around how type inference interacts with dead-code. The existing code generally ignores the type of dead-code unless a type-hint is provided; this can cause surprising inference interactions particularly around defaulting. The new code uniformly ignores the result type of dead-code. Tuple-struct constructors with private fields are no longer visible Lifetime parameters that do not appear in the arguments are now considered early-bound, resolving a soundness bug (#32330). The hr_lifetime_in_assoc_type future-compatibility lint has been in effect since April of 2016. rustdoc: fix doctests with non-feature crate attributes Make transmuting from fn item types to pointer-sized types a hard error |
||
jperkin
|
4b5aec7ba8 |
Update lang/rust to 1.15.1. Changes since 1.11.0 are too numerous to
list, but can be found here: https://github.com/rust-lang/rust/blob/master/RELEASES.md Add a stage0-bootstrap target to simplify generation of bootstrap kits for platforms which are not supported upstream (primarily SmartOS). |
||
maya
|
7f28b9aeec |
rust: match newer versions of llvm, too.
while I didn't complete the build, it is likely necessary, as pkgsrc llvm is 3.9 and doesn't match this test. |
||
ryoon
|
ba33d41371 |
Restore accidentally deleted comment and use .NetBSD suffix
Thank you, jperkin@. |
||
ryoon
|
ff942a2cbf |
Add NetBSD/amd64 support
This package must be built with pkgtools/cwrappers with USE_CWRAPPERS=yes. |
||
jperkin
|
9fd0fe84f9 |
Import rust 1.11.0 as lang/rust into pkgsrc.
pkgsrc notes: * The build requires binary bootstraps built by the Rust team. Due to the requirement that only the previous version is supported as a bootstrap compiler, and new versions of Rust are released every 6 weeks, it is unlikely to be practical to build TNF bootstraps. Users should evaluate whether they trust binaries from upstream. * There is currently no SunOS bootstrap provided by the Rust team, so for now a version built by myself is provided by Joyent. * Only Darwin/Linux/SunOS are currently supported. The Rust team do provide NetBSD bootstraps so support should be easy enough to add. Information about Rust from the DESCR: Rust is a systems programming language focused on three goals: safety, speed, and concurrency. It maintains these goals without having a garbage collector, making it a useful language for a number of use cases other languages aren't good at: embedding in other languages, programs with specific space and time requirements, and writing low-level code, like device drivers and operating systems. It improves on current languages targeting this space by having a number of compile-time safety checks that produce no runtime overhead, while eliminating all data races. Rust also aims to achieve "zero-cost abstractions" even though some of these abstractions feel like those of a high-level language. Even then, Rust still allows precise control like a low-level language would. |