diff --git a/_constraints b/_constraints index 2d10a1c..03dc120 100644 --- a/_constraints +++ b/_constraints @@ -1,12 +1,12 @@ - 4 + 8 8 - 20 + 25 diff --git a/rust.changes b/rust.changes index 5ea36ce..65521c2 100644 --- a/rust.changes +++ b/rust.changes @@ -1,3 +1,106 @@ +------------------------------------------------------------------- +Sat Mar 2 05:17:36 UTC 2019 - Luke Jones + +- Update to version 1.33.0 + + Language + - You can now use the `cfg(target_vendor)` attribute. E.g. + `#[cfg(target_vendor="linux")] fn main() { println!("Hello Linux!"); }` + - Integer patterns such as in a match expression can now be exhaustive. + 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. You can do this with the same syntax as a `match` + expression. E.g. + ``` + 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. 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. + - You can now call unsafe const functions. E.g. + ``` + const unsafe fn foo() -> i32 { 5 } + const fn bar() -> i32 { + unsafe { foo() } + } + ``` + - You can now specify multiple attributes in a `cfg_attr` attribute. + E.g. `#[cfg_attr(all(), must_use, optimize)]` + - You can now specify a specific alignment with the `#[repr(packed)]` + attribute. 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 `_`. This allows you to + import a trait's impls, and not have the name in the namespace. E.g. + ``` + use std::io::Read as _; + + // Allowed as there is only one `Read` in the module. + pub trait Read {} + ``` + - extern` functions will now abort by default when panicking. + This was previously undefined behaviour. + + Compiler + - You can now set a linker flavor for `rustc` with the `-Clinker-flavor` + command line argument. + - The mininum required LLVM version has been bumped to 6.0. + - Added support for the PowerPC64 architecture on FreeBSD. + - The `x86_64-fortanix-unknown-sgx` target support has been upgraded to + tier 2 support. 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. + - Added support for the `x86_64-unknown-uefi` target. + + + Libraries + - The methods `overflowing_{add, sub, mul, shl, shr}` are now `const` + functions for all numeric types. + - The methods `rotate_left`, `rotate_right`, and `wrapping_{add, sub, mul, shl, shr}` + are now `const` functions for all numeric types. + - The methods `is_positive` and `is_negative` are now `const` functions for + all signed numeric types. + - The `get` method for all `NonZero` types is now `const`. + - 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. + - Ipv4Addr::new` is now a `const` function + + 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. + ------------------------------------------------------------------- Fri Mar 1 06:57:58 UTC 2019 - Luke Jones diff --git a/rust.spec b/rust.spec index 393388b..0e447f4 100644 --- a/rust.spec +++ b/rust.spec @@ -79,7 +79,7 @@ %global rustflags -Clink-arg=-Wl,-z,relro,-z,now Name: rust -Version: 1.32.0 +Version: 1.33.0 Release: 0 Summary: A systems programming language License: MIT OR Apache-2.0 @@ -302,6 +302,19 @@ BuildArch: noarch %description -n cargo-doc This package includes HTML documentation for Cargo. +%package -n cargo-miri +Version: %{version} +Release: 0 +Summary: Interpretor for Rust MIR +License: MIT OR Apache-2.0 +Group: Development/Languages/Rust +Requires: cargo = %{version} + +%description -n cargo-miri +An interpreter for Rust's mid-level intermediate representation (MIR). +It can run binaries and test suites of cargo projects and detect certain +classes of undefined behavior. + %prep %if %{with rust_bootstrap} %ifarch x86_64 @@ -356,10 +369,6 @@ rm -rf src/tools/lldb rm -rf src/llvm/ %endif -# extract bundled licenses for packaging -sed -e '/*\//q' src/libbacktrace/backtrace.h \ - >src/libbacktrace/LICENSE-libbacktrace - # The configure macro will modify some autoconf-related files, which upsets # cargo when it tries to verify checksums in those files. If we just truncate # that file list, cargo won't have anything to complain about. @@ -368,14 +377,8 @@ find vendor -name .cargo-checksum.json \ # Fix rpmlint error "This script uses 'env' as an interpreter" sed -i '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' src/libcore/unicode/unicode.py -find src/libcompiler_builtins/compiler-rt/lib/ -name '*.py' \ - -exec sed -i -e '1s|#!%{_bindir}/env python|#!%{_bindir}/python3|' '{}' '+' # Fix rpmlint warnings about these shell scripts not having a shebang or incorrect path -sed -i '1s|^|#!/bin/bash\n|' src/libbacktrace/ltmain.sh -sed -i '1s|^|#!/bin/bash\n|' src/libcompiler_builtins/ci/run.sh -sed -i '1s|^|#!/bin/bash\n|' src/liblibc/ci/run-docker.sh -sed -i '1s|^|#!/bin/bash\n|' src/liblibc/ci/emscripten-entry.sh sed -i '1s|^|#!/bin/bash\n|' src/stdsimd/ci/run-docker.sh %build @@ -471,9 +474,6 @@ find %{buildroot}%{rustlibdir} -type f -name '.travis.yml -exec rm -v '{}' '+' # The shared libraries should be executable for debuginfo extraction. find %{buildroot}%{rustlibdir} -maxdepth 1 -type f -name '*.so' -exec chmod -v +x '{}' '+' -# extract bundled licenses for packaging - From fedora spec -sed -e '/*\//q' src/libbacktrace/backtrace.h > src/libbacktrace/LICENSE-libbacktrace - # The html docs for x86 and x86_64 are the same in most places %fdupes %{buildroot}%{_docdir}/%{name}/html # We don't want to run fdupes over much else (like src) or it may cause weirdness. @@ -497,10 +497,8 @@ rm -rf %{buildroot}%{_sysconfdir} %files %if 0%{?suse_version} == 1315 %doc COPYRIGHT LICENSE-APACHE LICENSE-MIT -%doc src/libbacktrace/LICENSE-libbacktrace %else %license COPYRIGHT LICENSE-APACHE LICENSE-MIT -%license src/libbacktrace/LICENSE-libbacktrace %endif %doc CONTRIBUTING.md README.md RELEASES.md %{_bindir}/rustc @@ -594,4 +592,14 @@ rm -rf %{buildroot}%{_sysconfdir} %dir %{_docdir}/cargo %{_docdir}/cargo/html +%files -n cargo-miri +%if 0%{?suse_version} == 1315 +%doc src/tools/miri/LICENSE-{APACHE,MIT} +%else +%license src/tools/miri/LICENSE-{APACHE,MIT} +%endif +%doc src/tools/miri/README.md +%{_bindir}/cargo-miri +%{_bindir}/miri + %changelog diff --git a/rustc-1.32.0-src.tar.xz b/rustc-1.32.0-src.tar.xz deleted file mode 100644 index a5e9158..0000000 --- a/rustc-1.32.0-src.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d617a7dc39daaafa8256320991005fc376c8ef2080593918301b24466d0067af -size 99602696 diff --git a/rustc-1.33.0-src.tar.xz b/rustc-1.33.0-src.tar.xz new file mode 100644 index 0000000..1116aac --- /dev/null +++ b/rustc-1.33.0-src.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f4b1a72f1a29b23dcc9d7be5f60878f0434560513273906aa93dcd5c0de39b71 +size 100635400