pkgsrc/lang/rust/Makefile

478 lines
19 KiB
Makefile
Raw Normal View History

# $NetBSD: Makefile,v 1.100 2019/05/31 07:21:53 jperkin Exp $
DISTNAME= rustc-1.34.2-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/
MAINTAINER= pkgsrc-users@NetBSD.org
2017-09-04 20:08:18 +02:00
HOMEPAGE= https://www.rust-lang.org/
COMMENT= Safe, concurrent, practical language
LICENSE= mit OR apache-2.0
USE_GCC_RUNTIME= yes
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
2017-09-30 06:42:43 +02:00
USE_LANGUAGES= c c++11
USE_LIBTOOL= yes
USE_TOOLS+= bash ggrep gmake perl:build pkg-config
# For internal llvm
BUILD_DEPENDS+= cmake-[0-9]*:../../devel/cmake
# The NetBSD bootstraps are built for NetBSD 8 (because rust doesn't
# build on 7). Mark earlier versions as broken.
BROKEN_ON_PLATFORM+= NetBSD-[1-7].*-*
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
2019-01-19 13:44:08 +01:00
CHECK_PORTABILITY_SKIP+=vendor/openssl-src/openssl/.travis-create-release.sh
HAS_CONFIGURE= yes
2019-01-03 04:12:30 +01:00
PYTHON_FOR_BUILD_ONLY= yes
CONFIG_SHELL= ${PYTHONBIN}
CONFIGURE_SCRIPT= src/bootstrap/configure.py
CONFIGURE_ARGS+= --prefix=${PREFIX}
CONFIGURE_ARGS+= --mandir=${PREFIX}/${PKGMANDIR}
CONFIGURE_ARGS+= --sysconfdir=${PKG_SYSCONFDIR}
CONFIGURE_ARGS+= --python=${PYTHONBIN}
CONFIGURE_ARGS+= --release-channel=stable
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
2017-11-28 01:07:27 +01:00
#CONFIGURE_ARGS+= --enable-local-rust
CONFIGURE_ARGS+= --local-rust-root=${RUST_BOOTSTRAP_PATH}
CONFIGURE_ARGS+= --enable-extended # Build and install cargo too.
CONFIGURE_ARGS+= --enable-rpath
CONFIGURE_ARGS+= --disable-codegen-tests
CONFIGURE_ARGS+= --disable-dist-src
CONFIGURE_ARGS+= --disable-llvm-static-stdcpp
CONFIGURE_ARGS+= --disable-ninja
# XXX: to be enabled in the future
#CONFIGURE_ARGS+= --jemalloc-root=${BUILDLINK_PREFIX.jemalloc}/lib
# Use "dist" build target for cross compile of bootstrap
#BUILD_TARGET= dist
BUILD_TARGET= build
# The gcc-wrap / c++-wrap script takes CROSS_ROOT environment variable
# to do a cross-build. The wrapper script assumes dest/ and tools/
# as a result of a cross-build as subdirectories of this root
#CROSS_ROOT= /u/evbarm-armv7hf
#CROSS_ROOT= /u/sparc64
#CROSS_ROOT= /u/macppc
#CROSS_ROOT= /u/evbarm64
#MAKE_ENV+= CROSS_ROOT=${CROSS_ROOT}
# The GNU cross target designation
#GNU_CROSS_TARGET= armv7--netbsdelf-eabihf
#GNU_CROSS_TARGET= sparc64--netbsd
#GNU_CROSS_TARGET= powerpc--netbsd
#GNU_CROSS_TARGET= aarch64--netbsd
#MAKE_ENV+= GNU_CROSS_TARGET=${GNU_CROSS_TARGET}
# To cross-build rust, you need to specify
# the ultimate target to built for, as well as the
# host the compiler is supposed to run on.
# Rust's target designation
#TARGET= armv7-unknown-netbsd-eabihf
#TARGET= sparc64-unknown-netbsd
#TARGET= powerpc-unknown-netbsd
#TARGET= aarch64-unknown-netbsd
#SCRIPTS= ${WRKDIR}/scripts
#CONFIGURE_ARGS+= --host=${TARGET}
#CONFIGURE_ARGS+= --target=${TARGET}
# for gcc as target compiler:
#CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/gcc-wrap
#CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/c++-wrap
#CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/gcc-wrap
# for clang as target compiler:
#CONFIGURE_ARGS+= --set=target.${TARGET}.cc=${SCRIPTS}/clang-wrap
#CONFIGURE_ARGS+= --set=target.${TARGET}.cxx=${SCRIPTS}/clang++-wrap
#CONFIGURE_ARGS+= --set=target.${TARGET}.linker=${SCRIPTS}/clang-wrap
# common:
#CONFIGURE_ARGS+= --set=target.${TARGET}.ar=${CROSS_ROOT}/tools/bin/${GNU_CROSS_TARGET}-ar
# May be required when cross-building on NetBSD
#MAKE_ENV+= OPENSSL_DIR=/usr
# Getting RPATH with $ORIGIN into bootstrap may be troublesome, so
# uncommenting the LD_LIBRARY_PATH setting may be required to run
# the bootstrap
PKGSRC_MAKE_ENV+= LD_LIBRARY_PATH=${RUST_BOOTSTRAP_PATH:Q}/lib
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)
# Bootstrapping on NetBSD/powerpc requires no debug-info from rustc
# (both for amd64->powerpc built and powerpc->powerpc built bootstrap bits)
CONFIGURE_ARGS+= --disable-debug
CONFIGURE_ARGS+= --disable-debuginfo-tests
CONFIGURE_ARGS+= --disable-debug-assertions
CONFIGURE_ARGS+= --disable-debuginfo
CONFIGURE_ARGS+= --disable-debuginfo-lines
CONFIGURE_ARGS+= --disable-debuginfo-only-std
CONFIGURE_ARGS+= --disable-debuginfo-tools
.endif
# This should allow us to perform "offline" builds (so cargo doesn't fetch
# dependencies during the build stage) but this isn't hooked up yet.
CONFIGURE_ARGS+= --enable-vendor
# cargo defaults to using the number of available CPUs
MAKE_ENV+= CARGO_BUILD_JOBS=${MAKE_JOBS:U1}
CFLAGS.SunOS+= -D_POSIX_PTHREAD_SEMANTICS
UNLIMIT_RESOURCES+= cputime
TEST_TARGET= check
2017-10-07 15:08:37 +02:00
# bin/* lib/*, but names vary
CHECK_RELRO_SUPPORTED= no
CHECK_SSP_SUPPORTED= no
2017-10-07 15:08:37 +02:00
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
2018-09-14 12:04:43 +02:00
CHECK_PORTABILITY_SKIP+= src/vendor/openssl-src/openssl/.travis-create-release.sh
# Required for LLVM (-std=c++11)
GCC_REQD+= 4.8
.include "../../mk/bsd.prefs.mk"
# The bundled LLVM current has issues building on SunOS.
.if ${OPSYS} == "SunOS"
.include "../../lang/llvm/buildlink3.mk"
CONFIGURE_ARGS+= --enable-llvm-link-shared
CONFIGURE_ARGS+= --llvm-root=${BUILDLINK_PREFIX.llvm}
.endif
#
# Under NetBSD, do not use DT_RUNPATH
#
BUILDLINK_TRANSFORM.NetBSD+= rm:-Wl,--enable-new-dtags
.PHONY: pre-build-fix
#
# Rust unfortunately requires itself to build. On platforms which aren't
# supported by upstream (where they offer binary bootstraps), or where we do
# not trust random binaries from the Internet, we need to build and provide our
# own bootstrap. See the stage0-bootstrap below for more details.
#
DISTFILES:= ${DEFAULT_DISTFILES}
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
#
.if !empty(MACHINE_PLATFORM:MDarwin-*-i386) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
RUST_ARCH:= i686-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
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
2017-09-30 06:42:43 +02:00
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MDarwin-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
RUST_ARCH:= x86_64-apple-darwin
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
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
2017-09-30 06:42:43 +02:00
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-i386) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
RUST_ARCH:= i686-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
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
2017-09-30 06:42:43 +02:00
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MLinux-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
RUST_ARCH:= x86_64-unknown-linux-gnu
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
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
2017-09-30 06:42:43 +02:00
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
2018-12-15 13:41:43 +01:00
.if !empty(MACHINE_PLATFORM:MSunOS-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
2018-12-15 13:41:43 +01:00
RUST_ARCH:= x86_64-sun-solaris
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
SITES.${RUST_STAGE0}= https://us-east.manta.joyent.com/pkgsrc/public/pkg-bootstraps/
DISTFILES:= ${DISTFILES} ${RUST_STAGE0}
RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}
pre-build-fix:
.endif
2018-03-02 06:59:18 +01:00
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
2018-03-02 06:59:18 +01:00
RUST_ARCH:= i686-unknown-freebsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
2018-03-02 06:59:18 +01:00
.endif
.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
2018-03-02 06:59:18 +01:00
RUST_ARCH:= x86_64-unknown-freebsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
2018-03-02 06:59:18 +01:00
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-i386) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.33.0
RUST_ARCH= i686-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
# Bootstrap kit prepared by he@
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
2018-01-04 16:18:50 +01:00
# Setting this changes it for every distfile, which doesn't match what is
# currently in distinfo.
#DIST_SUBDIR= ${PKGNAME}
# For atomic ops
CFLAGS+= -march=i586
pre-build-fix:
${TOOLS_PLATFORM.paxctl} +am ${WRKDIR}/rust-bootstrap/bin/cargo
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
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
2019-04-14 14:42:03 +02:00
RUST_STAGE0_VER= 1.33.0
RUST_ARCH= x86_64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
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
2017-09-30 06:42:43 +02:00
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-powerpc) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.34.0
RUST_ARCH= powerpc-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
# Bootstrap kit prepared by he@
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-aarch64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.34.0
RUST_ARCH= aarch64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
# Bootstrap kit prepared by he@
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64) || make(distinfo) || make (makesum) || make(mdi)
RUST_STAGE0_VER= 1.34.0
RUST_ARCH= sparc64-unknown-netbsd
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
# Bootstrap kit prepared by he@
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
pre-build-fix:
.endif
.if !empty(MACHINE_PLATFORM:MNetBSD-*-earmv7hf) || make(distinfo) || make (makesum) || make(mdi)
RUST_ARCH= armv7-unknown-netbsd-eabihf
RUST_STAGE0_VER= 1.34.0
RUST_STAGE0:= rust-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
RUST_STD_STAGE0:= rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}.tar.gz
DISTFILES:= ${DISTFILES} ${RUST_STAGE0} ${RUST_STD_STAGE0}
# Bootstrap kit prepared by he@
SITES.${RUST_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
SITES.${RUST_STD_STAGE0}= ftp://golden-delicious.urc.uninett.no/pub/rust/
pre-build-fix:
.endif
# You may override RUST_BOOTSTRAP_PATH and RUST_ARCH in mk.conf if you have a local bootstrap compiler.
.if !defined(RUST_ARCH) && !defined(RUST_BOOTSTRAP_PATH)
NOT_FOR_PLATFORM+= ${MACHINE_PLATFORM}
.else
RUST_BOOTSTRAP_PATH?= ${WRKDIR}/rust-bootstrap
.endif
.if ${OPSYS} == "SunOS"
BUILD_DEPENDS+= coreutils>=0:../../sysutils/coreutils
TOOLS_CREATE+= md5sum
TOOLS_PATH.md5sum= ${PREFIX}/bin/gmd5sum
.endif
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
2017-09-30 06:42:43 +02:00
SUBST_CLASSES+= rpath
SUBST_STAGE.rpath= pre-configure
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
2017-09-30 06:42:43 +02:00
SUBST_FILES.rpath= src/bootstrap/bin/rustc.rs
SUBST_VARS.rpath= PREFIX
post-extract:
set -e; \
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
2018-09-14 12:04:43 +02:00
if ${TEST} -e ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}/install.sh \
-a ! -e ${RUST_BOOTSTRAP_PATH}/bin/rustc; then \
cd ${WRKDIR}/rust-${RUST_STAGE0_VER}-${RUST_ARCH}; \
${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \
cd ${WRKDIR}/rust-std-${RUST_STAGE0_VER}-${RUST_ARCH}; \
${TOOLS_BASH} ./install.sh --prefix=${RUST_BOOTSTRAP_PATH}; \
fi
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.
2018-06-24 10:05:25 +02:00
# patch(1) in NetBSD does not handle .cargo-checksum.json like long width file.
${CP} ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json \
${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json.orig
${SED} -e 's/cb94a0b54e47022b2e9b58b45e0196785c61d083760333276226da435cc040d9/bcb195562cf830c9e2078757e6d0976f86ede59816ff305e21a2764a4a4cf43e/' ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json.orig > ${WRKSRC}/vendor/rand-0.5.5/.cargo-checksum.json
${CP} ${WRKSRC}/vendor/rand/.cargo-checksum.json \
${WRKSRC}/vendor/rand/.cargo-checksum.json.orig
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
2019-03-03 10:16:21 +01:00
${SED} -e 's/1e732c2e3b4bd1561f11e0979bf9d20669a96eae7afe0deff9dfbb980ee47bf1/55abd8100db14a076dedbf84ce0f2db08158e1bd33ff1d4978bd3c4ad978f281/' ${WRKSRC}/vendor/rand/.cargo-checksum.json.orig > ${WRKSRC}/vendor/rand/.cargo-checksum.json
${CP} ${WRKSRC}/vendor/libc/.cargo-checksum.json \
${WRKSRC}/vendor/libc/.cargo-checksum.json.orig
${SED} -e 's/7950a26f3eb0b7bc8e71f524cc2e05832b759fe2ce12a58e0c1957e0ec1286dc/a188bb00f0eddf252738f830b864e3a39bf2345f05f195d5ee5ca42b101f1de5/' ${WRKSRC}/vendor/libc/.cargo-checksum.json.orig > ${WRKSRC}/vendor/libc/.cargo-checksum.json
${CP} ${WRKSRC}/vendor/backtrace-sys/.cargo-checksum.json \
${WRKSRC}/vendor/backtrace-sys/.cargo-checksum.json.orig
${SED} -e 's/59763fc255248b54fba5d0761d61093a73d51fa4cb400b0df1b5f339b9c2f48a/ba66d192421fd536ceddb50616c4c4aea06f4e39450eb0bc2bbbaed0b1e684c1/' ${WRKSRC}/vendor/backtrace-sys/.cargo-checksum.json.orig > ${WRKSRC}/vendor/backtrace-sys/.cargo-checksum.json
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
2019-01-19 13:44:08 +01:00
.if ${OPSYS} == "NetBSD"
SDIR=${WRKDIR}/scripts; \
${MKDIR} $${SDIR}; \
cd $${SDIR}; \
${RM} -f c++-wrap; \
${RM} -f clang++-wrap; \
${RM} -f clang-wrap; \
${CP} ${.CURDIR}/files/gcc-wrap .; \
${CHMOD} +x gcc-wrap; \
${LN} -s gcc-wrap c++-wrap; \
${LN} -s gcc-wrap clang++-wrap; \
${LN} -s gcc-wrap clang-wrap
.endif
2018-03-02 06:59:18 +01:00
.if ${OPSYS} == "FreeBSD"
MAKE_ENV+= OPENSSL_DIR=${SSLBASE}
.endif
.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so)
BUILDLINK_TRANSFORM+= rm:-lgcc_s
MAKE_ENV+= PKGSRC_HAVE_LIBCPP=yes
.endif
pre-build: pre-build-fix
.if ${OPSYS} == "NetBSD" && !empty(PKGSRC_COMPILER:Mclang) && !exists(/lib/libgcc_s.so)
cp ${FILESDIR}/libgcc_s.so.1 ${RUST_BOOTSTRAP_PATH}/lib/.
.endif
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
2018-09-14 12:04:43 +02:00
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
2017-09-30 06:42:43 +02:00
do-build:
cd ${WRKSRC} \
&& ${SETENV} ${MAKE_ENV} \
${PYTHONBIN} ./x.py -v ${BUILD_TARGET} -j ${MAKE_JOBS:U1}
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
2017-09-30 06:42:43 +02:00
do-install:
cd ${WRKSRC} \
&& ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} \
${PYTHONBIN} ./x.py -v install -j ${MAKE_JOBS:U1}
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
2017-09-30 06:42:43 +02:00
GENERATE_PLIST+=find ${DESTDIR}${PREFIX} \( -type f -o -type l \) -print | \
sed 's,${DESTDIR}${PREFIX}/,,' | ${SORT} ;
.if ${OPSYS} == "Darwin"
LDFLAGS+= -headerpad_max_install_names
.PHONY: fix-darwin-install-name
post-install: fix-darwin-install-name
fix-darwin-install-name:
. for bin in clippy-driver rls rustc rustdoc
otool -XL ${DESTDIR}${PREFIX}/bin/${bin} \
| ${GREP} '@rpath' | while read rpath rest; do \
install_name_tool -change $$rpath \
`${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
${DESTDIR}${PREFIX}/bin/${bin}; \
done
. endfor
. for libdir in lib lib/rustlib/${RUST_ARCH}/lib lib/rustlib/${RUST_ARCH}/codegen-backends
for f in ${DESTDIR}${PREFIX}/${libdir}/lib*.dylib; do \
[ ! -f $$f ] && continue; \
install_name_tool -id `${ECHO} $$f | ${SED} -e 's,${DESTDIR},,g'` $$f; \
otool -XL $$f | grep '@rpath' | while read rpath rest; do \
install_name_tool -change $$rpath \
`${ECHO} $$rpath | ${SED} -e 's,@rpath,${PREFIX}/lib,g'` \
$$f; \
done; \
done
. endfor
.endif
#
# Create a relocatable stage2 bootstrap from the bits we just built that can be
# used to build the next version of rust. Currently only tested on SmartOS.
#
2018-01-04 16:18:50 +01:00
BOOTSTRAP_TMPDIR= ${WRKDIR}/${PKGNAME_NOREV}-${RUST_ARCH}
USE_TOOLS+= gtar
# The NetBSD part is so far untested, because I could not convince
# the rust build to use the gcc wrapper when building natively,
# so that I could get a placeholder in the RPATH, because chrpath
# cannot extend the length of the RPATH...
stage0-bootstrap: install
2018-01-04 16:18:50 +01:00
${RM} -rf ${BOOTSTRAP_TMPDIR}
${MKDIR} ${BOOTSTRAP_TMPDIR}
.if ${OPSYS} == "NetBSD"
(cd ${BOOTSTRAP_TMPDIR}; \
DISTDIR=${WRKSRC}/bild/dist; \
VER_ARCH=${PKGVERSION}-${RUST_ARCH}; \
RUSTC=rustc-$${VER_ARCH}; \
RUSTC_FILE=$${RUSTC}.tar.gz; \
RUST_STD=rust-std-$${VER_ARCH}; \
RUST_STD_FILE=$${RUST_STD}.tar.gz; \
${GTAR} -xzf $${DISTDIR}/$${RUSTC_FILE}; \
(cd ${RUSTC}; \
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN/../lib'; \
for f in rls-preview/bin/rls rustc/bin/rustc rustc/bin/rustdoc; do \
chrpath -r $$RPATH $$f; \
done; \
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN'; \
for f in rustc/lib/*.so*; do \
chrpath -r $$RPATH $$f; \
done; \
RPATH='/usr/pkg/lib:/lib:/usr/lib:$$ORIGIN:$$ORIGIN/../../..'; \
for f in rustc/lib/rustlib/*/*/*.so*; do \
chrpath -r $$RPATH $$f; \
done;); \
${GTAR} -czf $${RUSTC_FILE} $${RUSTC}; \
${CP} $${DISTDIR}/$${RUST_STD_FILE} .; \
${ECHO} "Fixed stage0 bootstrap in ${BOOTSTRAP_TMPDIR}:"; \
${ECHO} "$${RUSTC_FILE}"; \
${ECHO} "$${RUST_STD_FILE}"; \
)
.endif
.if ${OS_VARIANT} == "SmartOS"
${CP} -R ${DESTDIR}/${PREFIX}/bin ${BOOTSTRAP_TMPDIR}/
${CP} -R ${DESTDIR}/${PREFIX}/lib ${BOOTSTRAP_TMPDIR}/
2018-01-04 16:18:50 +01:00
${MKDIR} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc
for lib in libgcc_s.so.1 libssp.so.0 libstdc++.so.6; do \
${CP} `${PKG_CC} -print-file-name=$${lib}` \
2018-01-04 16:18:50 +01:00
${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
done
2018-01-04 16:18:50 +01:00
for lib in libcrypto.so.1.0.0 libcurl.so.4 libhttp_parser.so.2 \
libiconv.so.2 libidn2.so.0 libintl.so.8 liblber-2.4.so.2 \
libldap-2.4.so.2 libnghttp2.so.14 libsasl2.so.3 \
libssh2.so.1 libssl.so.1.0.0 libunistring.so.2 libz.so.1; do \
${CP} ${PREFIX}/lib/$${lib} ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/; \
done
2018-01-04 16:18:50 +01:00
for f in ${BOOTSTRAP_TMPDIR}/bin/{cargo,rls,rustc,rustdoc}; do \
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN/../lib:$$ORIGIN/../lib/pkgsrc' $$f; \
done
for f in ${BOOTSTRAP_TMPDIR}/lib/pkgsrc/*.so*; do \
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN' $$f; \
done
2018-01-04 16:18:50 +01:00
for f in ${BOOTSTRAP_TMPDIR}/lib/*.so*; do \
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/pkgsrc' $$f; \
done
for f in ${BOOTSTRAP_TMPDIR}/lib/rustlib/${RUST_ARCH}/*/*.so*; do \
2018-01-04 16:18:50 +01:00
/usr/bin/elfedit -e 'dyn:runpath $$ORIGIN:$$ORIGIN/../../..:$$ORIGIN/../../../pkgsrc' $$f; \
done
(cd ${WRKDIR}; \
2018-01-04 16:18:50 +01:00
${GTAR} -zcf ${PKGNAME_NOREV}-${RUST_ARCH}.tar.gz ${PKGNAME_NOREV}-${RUST_ARCH})
.endif
# These dependencies currently use the bundled sources as they require
# development features not yet available in released versions.
#
#.include "../../devel/libgit2/buildlink3.mk"
#.include "../../security/libssh2/buildlink3.mk"
#.include "../../www/curl/buildlink3.mk"
#.include "../../www/http-parser/buildlink3.mk"
.include "../../devel/cmake/buildlink3.mk"
#.include "../../devel/jemalloc/buildlink3.mk"
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
2017-09-30 06:42:43 +02:00
.include "../../devel/zlib/buildlink3.mk"
.include "../../lang/python/tool.mk"
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
2017-09-30 06:42:43 +02:00
.include "../../security/openssl/buildlink3.mk"
.include "../../mk/bsd.pkg.mk"