Hello community, here is the log from the commit of package rust for openSUSE:Factory checked in at 2020-05-07 17:49:57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rust (Old) and /work/SRC/openSUSE:Factory/.rust.new.2738 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rust" Thu May 7 17:49:57 2020 rev:51 rq:800121 version:1.43.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rust/rust.changes 2020-04-07 10:25:18.898095559 +0200 +++ /work/SRC/openSUSE:Factory/.rust.new.2738/rust.changes 2020-05-07 17:50:24.953259003 +0200 @@ -1,0 +2,102 @@ +Mon May 4 16:21:54 UTC 2020 - Ismail Dönmez <idon...@suse.com> + +- Add rust-pr70163-prepare-for-llvm-10-upgrade.patch to fix compilation + with llvm10 + +------------------------------------------------------------------- +Mon May 4 10:45:18 UTC 2020 - Andreas Schwab <sch...@suse.de> + +- Update rustfmt_version + +------------------------------------------------------------------- +Wed Apr 29 11:46:59 UTC 2020 - Martin Sirringhaus <martin.sirringh...@suse.com> + +- Update to version 1.43.0 + + Language + - Fixed using binary operations with `&{number}` (e.g. `&1.0`) + not having the type inferred correctly. + - Attributes such as `#[cfg()]` can now be used on `if` + expressions. + - Syntax only changes: + * Allow `type Foo: Ord` syntactically. + * Fuse associated and extern items up to defaultness. + * Syntactically allow `self` in all `fn` contexts. + * Merge `fn` syntax + cleanup item parsing. + * `item` macro fragments can be interpolated into `trait`s, + `impl`s, and `extern` blocks. + For example, you may now write: + ```rust + macro_rules! mac_trait { + ($i:item) => { + trait T { $i } + } + } + mac_trait! { + fn foo() {} + } + ``` + * These are still rejected *semantically*, so you will likely + receive an error but these changes can be seen and parsed by + macros and conditional compilation. + + Compiler + - You can now pass multiple lint flags to rustc to override the + previous flags. + For example; `rustc -D unused -A unused-variables` denies + everything in the `unused` lint group except `unused-variables` + which is explicitly allowed. However, passing + `rustc -A unused-variables -D unused` denies everything in + the `unused` lint group **including** `unused-variables` since + the allow flag is specified before the deny flag (and therefore + overridden). + - rustc will now prefer your system MinGW libraries over its + bundled libraries if they are available on `windows-gnu`. + - rustc now buffers errors/warnings printed in JSON. + + Libraries + - `Arc<[T; N]>`, `Box<[T; N]>`, and `Rc<[T; N]>`, now implement + `TryFrom<Arc<[T]>>`,`TryFrom<Box<[T]>>`, and `TryFrom<Rc<[T]>>` + respectively. + **Note** These conversions are only available when `N` is + `0..=32`. + - You can now use associated constants on floats and integers + directly, rather than having to import the module. + e.g. You can now write `u32::MAX` or `f32::NAN` with no imports. + - `u8::is_ascii` is now `const`. + - `String` now implements `AsMut<str>`. + - Added the `primitive` module to `std` and `core`. + This module reexports Rust's primitive types. This is mainly + useful in macros where you want avoid these types being shadowed. + - Relaxed some of the trait bounds on `HashMap` and `HashSet`. + - `string::FromUtf8Error` now implements `Clone + Eq`. + + Stabilized APIs + - `Once::is_completed` + - `f32::LOG10_2` + - `f32::LOG2_10` + - `f64::LOG10_2` + - `f64::LOG2_10` + - `iter::once_with` + + Cargo + - You can now set config `[profile]`s in your `.cargo/config`, + or through your environment. + - Cargo will now set `CARGO_BIN_EXE_<name>` pointing to a + binary's executable path when running integration tests or + benchmarks. + `<name>` is the name of your binary as-is e.g. If you wanted + the executable path for a binary named `my-program`you would + use `env!("CARGO_BIN_EXE_my-program")`. + + Misc + - Certain checks in the `const_err` lint were deemed unrelated + to const evaluation, and have been moved to the + `unconditional_panic` and `arithmetic_overflow` lints. + + Compatibility Notes + - Having trailing syntax in the `assert!` macro is now a hard + error. This has been a warning since 1.36.0. + - Fixed `Self` not having the correctly inferred type. This + incorrectly led to some instances being accepted, and now + correctly emits a hard error. + +------------------------------------------------------------------- +Tue Apr 7 08:54:37 UTC 2020 - Andreas Schwab <sch...@suse.de> + +- Avoid duplication of environment settings + +------------------------------------------------------------------- Old: ---- rust-1.41.1-aarch64-unknown-linux-gnu.tar.xz rust-1.41.1-armv7-unknown-linux-gnueabihf.tar.xz rust-1.41.1-i686-unknown-linux-gnu.tar.xz rust-1.41.1-powerpc-unknown-linux-gnu.tar.xz rust-1.41.1-powerpc64-unknown-linux-gnu.tar.xz rust-1.41.1-powerpc64le-unknown-linux-gnu.tar.xz rust-1.41.1-s390x-unknown-linux-gnu.tar.xz rust-1.41.1-x86_64-unknown-linux-gnu.tar.xz rustc-1.42.0-src.tar.xz New: ---- rust-1.42.0-aarch64-unknown-linux-gnu.tar.xz rust-1.42.0-armv7-unknown-linux-gnueabihf.tar.xz rust-1.42.0-i686-unknown-linux-gnu.tar.xz rust-1.42.0-powerpc-unknown-linux-gnu.tar.xz rust-1.42.0-powerpc64-unknown-linux-gnu.tar.xz rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz rust-1.42.0-s390x-unknown-linux-gnu.tar.xz rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz rust-pr70163-prepare-for-llvm-10-upgrade.patch rustc-1.43.0-src.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rust.spec ++++++ --- /var/tmp/diff_new_pack.yw7Hll/_old 2020-05-07 17:50:33.213276487 +0200 +++ /var/tmp/diff_new_pack.yw7Hll/_new 2020-05-07 17:50:33.213276487 +0200 @@ -1,7 +1,7 @@ # # spec file for package rust # -# Copyright (c) 2020 SUSE LLC. +# Copyright (c) 2020 SUSE LLC # Copyright (c) 2019 Luke Jones, l...@ljones.dev # # All modifications and additions to the file contributed by third parties @@ -17,12 +17,12 @@ # -%global version_current 1.42.0 -%global version_previous 1.41.1 -%global version_bootstrap 1.41.1 +%global version_current 1.43.0 +%global version_previous 1.42.0 +%global version_bootstrap 1.42.0 # some sub-packages are versioned independently -%global rustfmt_version 1.4.11 +%global rustfmt_version 1.4.12 %global clippy_version 0.0.212 # Build the rust target triple. @@ -135,7 +135,8 @@ Source1000: README.suse-maint # PATCH-FIX-OPENSUSE: edit src/librustc_llvm/build.rs to ignore GCC incompatible flag Patch0: ignore-Wstring-conversion.patch -# PATCH-FIX-UPSTREAM: fix rustdoc compilation: https://github.com/rust-lang/rust/issues/66224 +# PATCH-FIX-UPSTREAM: fix compilation with llvm10 https://github.com/rust-lang/rust/issues/71573 +Patch1: rust-pr70163-prepare-for-llvm-10-upgrade.patch BuildRequires: ccache BuildRequires: curl BuildRequires: fdupes @@ -309,9 +310,9 @@ %package -n clippy Summary: Lints to catch common mistakes and improve Rust code -# /usr/bin/clippy-driver is dynamically linked against internal rustc libs License: MPL-2.0 Group: Development/Languages/Rust +# /usr/bin/clippy-driver is dynamically linked against internal rustc libs Requires: %{name} = %{version} Requires: cargo = %{version} Provides: clippy = %{clippy_version} @@ -335,10 +336,10 @@ %package -n cargo-doc Summary: Documentation for Cargo -# Cargo no longer builds its own documentation -# https://github.com/rust-lang/cargo/pull/4904 License: MIT OR Apache-2.0 Group: Development/Languages/Rust +# Cargo no longer builds its own documentation +# https://github.com/rust-lang/cargo/pull/4904 Requires: rust-doc = %{version} BuildArch: noarch @@ -386,6 +387,7 @@ %setup -q -n rustc-%{version}-src %patch0 -p1 +%patch1 -p1 # use python3 sed -i -e "1s|#!.*|#!%{_bindir}/python3|" x.py @@ -455,12 +457,12 @@ sed -i -e "s|#local-rebuild = false|local-rebuild = true|" config.toml; fi -# BEGIN EXPORTS +# Create exports file # Keep all the "export VARIABLE" together here, so they can be -# cut&pasted to the %%install section below. And please keep them -# in sync! +# reread in the %%install section below. # If the environments between build and install and different, # everything will be rebuilt during installation! +cat > .env.sh <<\EOF export RUSTFLAGS="%{rustflags}" %if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500 export CC=gcc-7 @@ -470,34 +472,19 @@ %if !%{with rust_bootstrap} && 0%{?sle_version} >= 150000 export LIBSSH2_SYS_USE_PKG_CONFIG=1 %endif -# eliminate complain from RPMlint +# eliminate complaint from RPMlint export CPPFLAGS="%{optflags}" export DESTDIR=%{buildroot} # END EXPORTS +EOF +. ./.env.sh ./x.py build -v ./x.py doc -v %install -# BEGIN EXPORTS -# Keep all the "export VARIABLE" together here, so they can be -# cut&pasted to the %%install section below. And please keep them -# in sync! -# If the environments between build and install and different, -# everything will be rebuilt during installation! -export RUSTFLAGS="%{rustflags}" -%if 0%{?sle_version} >= 120000 && 0%{?sle_version} <= 120500 -export CC=gcc-7 -export CXX=g++-7 -%endif -# Make cargo use system libs if not bootstrapping -%if !%{with rust_bootstrap} && 0%{?sle_version} >= 150000 -export LIBSSH2_SYS_USE_PKG_CONFIG=1 -%endif -# eliminate complain from RPMlint -export CPPFLAGS="%{optflags}" -export DESTDIR=%{buildroot} -# END EXPORTS +# Reread exports file +. ./.env.sh ./x.py install ./x.py install src ++++++ rust-1.41.1-aarch64-unknown-linux-gnu.tar.xz -> rust-1.42.0-aarch64-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-aarch64-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-aarch64-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-armv7-unknown-linux-gnueabihf.tar.xz -> rust-1.42.0-armv7-unknown-linux-gnueabihf.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-armv7-unknown-linux-gnueabihf.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-armv7-unknown-linux-gnueabihf.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-i686-unknown-linux-gnu.tar.xz -> rust-1.42.0-i686-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-i686-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-i686-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-powerpc-unknown-linux-gnu.tar.xz -> rust-1.42.0-powerpc-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-powerpc-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-powerpc-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-powerpc-unknown-linux-gnu.tar.xz -> rust-1.42.0-powerpc64-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-powerpc-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-powerpc64-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-powerpc64le-unknown-linux-gnu.tar.xz -> rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-powerpc64le-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-powerpc64le-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-s390x-unknown-linux-gnu.tar.xz -> rust-1.42.0-s390x-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-s390x-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-s390x-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-1.41.1-x86_64-unknown-linux-gnu.tar.xz -> rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rust-1.41.1-x86_64-unknown-linux-gnu.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rust-1.42.0-x86_64-unknown-linux-gnu.tar.xz differ: char 15, line 1 ++++++ rust-pr70163-prepare-for-llvm-10-upgrade.patch ++++++ commit 374ab25585f0a817fe7bd6986737f12347b12d0b (from 1add455ec6f81045e7651c6225902823f5d4fbfa) Merge: 1add455ec6f8 497f879b1e24 Author: bors <b...@rust-lang.org> Date: Tue Mar 24 12:42:54 2020 +0000 Auto merge of #70163 - nikic:llvm-10-preparation, r=cuviper Prepare for LLVM 10 upgrade This is #67759 minus the submodule update. * Fix two compatibility issues in the rustllvm wrapper. * Update data layout strings in tests. * Fix LLVM version comparison (this become a problem because the major version has two digits now). r? @cuviper Index: rustc-1.43.0-src/src/bootstrap/test.rs =================================================================== --- rustc-1.43.0-src.orig/src/bootstrap/test.rs +++ rustc-1.43.0-src/src/bootstrap/test.rs @@ -1142,6 +1142,8 @@ impl Step for Compiletest { let llvm_config = builder.ensure(native::Llvm { target: builder.config.build }); if !builder.config.dry_run { let llvm_version = output(Command::new(&llvm_config).arg("--version")); + // Remove trailing newline from llvm-config output. + let llvm_version = llvm_version.trim_end(); cmd.arg("--llvm-version").arg(llvm_version); } if !builder.is_rust_llvm(target) { Index: rustc-1.43.0-src/src/rustllvm/PassWrapper.cpp =================================================================== --- rustc-1.43.0-src.orig/src/rustllvm/PassWrapper.cpp +++ rustc-1.43.0-src/src/rustllvm/PassWrapper.cpp @@ -67,7 +67,11 @@ extern "C" void LLVMInitializePasses() { } extern "C" void LLVMTimeTraceProfilerInitialize() { -#if LLVM_VERSION_GE(9, 0) +#if LLVM_VERSION_GE(10, 0) + timeTraceProfilerInitialize( + /* TimeTraceGranularity */ 0, + /* ProcName */ "rustc"); +#elif LLVM_VERSION_GE(9, 0) timeTraceProfilerInitialize(); #endif } Index: rustc-1.43.0-src/src/rustllvm/RustWrapper.cpp =================================================================== --- rustc-1.43.0-src.orig/src/rustllvm/RustWrapper.cpp +++ rustc-1.43.0-src/src/rustllvm/RustWrapper.cpp @@ -1328,8 +1328,13 @@ extern "C" LLVMValueRef LLVMRustBuildMem LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Val, LLVMValueRef Size, bool IsVolatile) { +#if LLVM_VERSION_GE(10, 0) + return wrap(unwrap(B)->CreateMemSet( + unwrap(Dst), unwrap(Val), unwrap(Size), MaybeAlign(DstAlign), IsVolatile)); +#else return wrap(unwrap(B)->CreateMemSet( unwrap(Dst), unwrap(Val), unwrap(Size), DstAlign, IsVolatile)); +#endif } extern "C" LLVMValueRef Index: rustc-1.43.0-src/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json =================================================================== --- rustc-1.43.0-src.orig/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json +++ rustc-1.43.0-src/src/test/run-make-fulldeps/target-specs/my-awesome-platform.json @@ -1,5 +1,5 @@ { - "data-layout": "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128", + "data-layout": "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-f64:32:64-f80:32-n8:16:32-S128", "linker-flavor": "gcc", "llvm-target": "i686-unknown-linux-gnu", "target-endian": "little", Index: rustc-1.43.0-src/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json =================================================================== --- rustc-1.43.0-src.orig/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json +++ rustc-1.43.0-src/src/test/run-make-fulldeps/target-specs/my-x86_64-unknown-linux-gnu-platform.json @@ -1,6 +1,6 @@ { "pre-link-args": {"gcc": ["-m64"]}, - "data-layout": "e-m:e-i64:64-f80:128-n8:16:32:64-S128", + "data-layout": "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128", "linker-flavor": "gcc", "llvm-target": "x86_64-unknown-linux-gnu", "target-endian": "little", Index: rustc-1.43.0-src/src/tools/compiletest/src/header.rs =================================================================== --- rustc-1.43.0-src.orig/src/tools/compiletest/src/header.rs +++ rustc-1.43.0-src/src/tools/compiletest/src/header.rs @@ -191,6 +191,7 @@ impl EarlyProps { return true; } if let Some(ref actual_version) = config.llvm_version { + let actual_version = version_to_int(actual_version); if line.starts_with("min-llvm-version") { let min_version = line .trim_end() @@ -199,7 +200,7 @@ impl EarlyProps { .expect("Malformed llvm version directive"); // Ignore if actual version is smaller the minimum required // version - &actual_version[..] < min_version + actual_version < version_to_int(min_version) } else if line.starts_with("min-system-llvm-version") { let min_version = line .trim_end() @@ -208,7 +209,7 @@ impl EarlyProps { .expect("Malformed llvm version directive"); // Ignore if using system LLVM and actual version // is smaller the minimum required version - config.system_llvm && &actual_version[..] < min_version + config.system_llvm && actual_version < version_to_int(min_version) } else if line.starts_with("ignore-llvm-version") { // Syntax is: "ignore-llvm-version <version1> [- <version2>]" let range_components = line @@ -219,15 +220,15 @@ impl EarlyProps { .take(3) // 3 or more = invalid, so take at most 3. .collect::<Vec<&str>>(); match range_components.len() { - 1 => &actual_version[..] == range_components[0], + 1 => actual_version == version_to_int(range_components[0]), 2 => { - let v_min = range_components[0]; - let v_max = range_components[1]; + let v_min = version_to_int(range_components[0]); + let v_max = version_to_int(range_components[1]); if v_max < v_min { panic!("Malformed LLVM version range: max < min") } // Ignore if version lies inside of range. - &actual_version[..] >= v_min && &actual_version[..] <= v_max + actual_version >= v_min && actual_version <= v_max } _ => panic!("Malformed LLVM version directive"), } @@ -238,6 +239,20 @@ impl EarlyProps { false } } + + fn version_to_int(version: &str) -> u32 { + let version_without_suffix = version.split('-').next().unwrap(); + let components: Vec<u32> = version_without_suffix + .split('.') + .map(|s| s.parse().expect("Malformed version component")) + .collect(); + match components.len() { + 1 => components[0] * 10000, + 2 => components[0] * 10000 + components[1] * 100, + 3 => components[0] * 10000 + components[1] * 100 + components[2], + _ => panic!("Malformed version"), + } + } } } Index: rustc-1.43.0-src/src/tools/compiletest/src/header/tests.rs =================================================================== --- rustc-1.43.0-src.orig/src/tools/compiletest/src/header/tests.rs +++ rustc-1.43.0-src/src/tools/compiletest/src/header/tests.rs @@ -122,9 +122,8 @@ fn llvm_version() { config.llvm_version = Some("9.3.1-rust-1.43.0-dev".to_owned()); assert!(!parse_rs(&config, "// min-llvm-version 9.2").ignore); - // FIXME. - // config.llvm_version = Some("10.0.0-rust".to_owned()); - // assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore); + config.llvm_version = Some("10.0.0-rust".to_owned()); + assert!(!parse_rs(&config, "// min-llvm-version 9.0").ignore); } #[test] ++++++ rustc-1.42.0-src.tar.xz -> rustc-1.43.0-src.tar.xz ++++++ /work/SRC/openSUSE:Factory/rust/rustc-1.42.0-src.tar.xz /work/SRC/openSUSE:Factory/.rust.new.2738/rustc-1.43.0-src.tar.xz differ: char 15, line 1