Accepting request 760082 from home:luke_nukem:branches:devel:languages:rust

- Update to version 1.40.0
Waiting on 1.39 to be merged in Factory.

OBS-URL: https://build.opensuse.org/request/show/760082
OBS-URL: https://build.opensuse.org/package/show/devel:languages:rust/rust?expand=0&rev=237
This commit is contained in:
Luke Jones 2020-01-01 19:06:39 +00:00 committed by Git OBS Bridge
parent 92c01454df
commit d5285e9bf9
23 changed files with 188 additions and 135 deletions

View File

@ -1,8 +1,8 @@
<services>
<service mode="disabled" name="download_files">
<service name="download_files" mode="disabled">
<param name="changesgenerate">enable</param>
</service>
<service mode="disabled" name="refresh_patches">
<service name="refresh_patches" mode="disabled">
<param name="changesgenerate">enable</param>
<param name="ignorefuzz">enable</param>
</service>

View File

@ -1,35 +0,0 @@
From 73369f32621f6a844a80a8513ae3ded901e4a406 Mon Sep 17 00:00:00 2001
From: Mark Rousskov <mark.simulacrum@gmail.com>
Date: Tue, 5 Nov 2019 11:16:46 -0500
Subject: [PATCH] Hopefully fix rustdoc build
It's super unclear why this broke when we switched to beta but not
previously -- but at least it's hopefully fixed now.
---
src/bootstrap/builder.rs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
Index: rustc-1.39.0-src/src/bootstrap/builder.rs
===================================================================
--- rustc-1.39.0-src.orig/src/bootstrap/builder.rs
+++ rustc-1.39.0-src/src/bootstrap/builder.rs
@@ -875,7 +875,18 @@ impl<'a> Builder<'a> {
// things still build right, please do!
match mode {
Mode::Std => metadata.push_str("std"),
- _ => {},
+ // When we're building rustc tools, they're built with a search path
+ // that contains things built during the rustc build. For example,
+ // bitflags is built during the rustc build, and is a dependency of
+ // rustdoc as well. We're building rustdoc in a different target
+ // directory, though, which means that Cargo will rebuild the
+ // dependency. When we go on to build rustdoc, we'll look for
+ // bitflags, and find two different copies: one built during the
+ // rustc step and one that we just built. This isn't always a
+ // problem, somehow -- not really clear why -- but we know that this
+ // fixes things.
+ Mode::ToolRustc => metadata.push_str("tool-rustc"),
+ _ => {}
}
cargo.env("__CARGO_DEFAULT_LIB_METADATA", &metadata);

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6ab06ff04cc41e612dd55f3358a1239be8cceb0ad8018996d39ae3e3b23156d2
size 235231988

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:c8b9ced4a6b6efe32ac41e2ec032f847223b48ead04dedd2172e08d98616a774
size 243411104

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:5c488cea89cef760362868eb790896bdf31b3109e392f0d54b27b74bd214df33
size 298169160

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b4ef3d69c8f31cfecd697decedfc5663374f543cfdd0db3d090ebdd8172e10a5
size 239750464

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6d14e0e4c334472a34a4a0943305ad8ef2a824bcd48ec92b71a11307a7be74b1
size 240082008

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6c253cc0f9441ab6ef4c2457e0ef8748c076d7d1897ab8a8a7bbb00308603a2b
size 244407488

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:797c15038950f7a20abcc51c738fe5948a222c9847f01bce03ca0c76fe142879
size 291685528

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4e9a2ef90679a66c9f8c62b113b018866303645a69c4812d8290d8a7162ea190
size 279859784

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:a3f6943ad00bbf7131c8571b21f641082c8ac8298ee3a8bd5428e96743e31e05
size 238165960

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:d98a3cfaa427e7bba95a36cbe98cc2ded3ff5ee87242add1e0c393467c069756
size 246114456

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:26b57f9c76ef9119e703a5b5acb7026963f18814cc167c2d8d6a562e05ad755c
size 297665804

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:47784d04dbee846d50f662276f659ee0b0b6719d1abc9efdb29cf17eaec745cd
size 240597272

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4a38a477ec7b6fd111d84c48ef7f35d16e7a21bca5cf8820e9274bf76e969ef5
size 242170220

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b5e9abf89cb4d04f5e03aae77ef6a3cddc32821b9cd833f4c32a335fbb46cf76
size 247026740

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ec7f8e98a3ecb7838bc11ffde968465b34d08ac6fdb37459af12ae99f617b0dd
size 298119784

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:095874d294355e95236e07e3e82635d95b8872f751ad21c5d1d9b53ef443e536
size 284967620

View File

@ -1,16 +1,23 @@
# filters for rust-src
addFilter("devel-dependency rust-std-static")
addFilter("devel-file-in-non-devel-package.*/usr/lib/rustlib/src/.*")
# filters for rust-std
# rlib not in elf format
addFilter("binaryinfo-readelf-failed.*/usr/lib/rustlib/.*rlib")
# rust has no stable ABI as of yet, soname is of no use yet
addFilter("no-soname.*/usr/lib/rustlib/.*")
addFilter("no-soname.*/usr/lib/lib*")
# tool versions don't always change at same pace as rustc
addFilter("clippy.x86_64: W: no-version-in-last-changelog")
addFilter("rls.x86_64: W: no-version-in-last-changelog")
addFilter("rust-analysis.x86_64: W: no-version-in-last-changelog")
addFilter("rustfmt.x86_64: W: no-version-in-last-changelog")
# we use a "provides =" with version to set the version correctly
addFilter("clippy.x86_64: W: useless-provides clippy")
addFilter("rustfmt.x86_64: W: useless-provides rustfmt")
# error when building with bootstrap. ignore for now
addFilter(".*shlib-policy-name-error.*libLLVM-8.*")

View File

@ -1,3 +1,85 @@
-------------------------------------------------------------------
Mon Dec 30 03:48:37 UTC 2019 - Luke Jones <luke@ljones.dev>
- Update to version 1.40.0
+ Language
- You can now use tuple `struct`s and tuple `enum` variant's constructors in
`const` contexts. e.g.
pub struct Point(i32, i32);
const ORIGIN: Point = {
let constructor = Point;
constructor(0, 0)
};
- You can now mark `struct`s, `enum`s, and `enum` variants with the `#[non_exhaustive]` attribute to
indicate that there may be variants or fields added in the future.
For example this requires adding a wild-card branch (`_ => {}`) to any match
statements on a non-exhaustive `enum`.
- You can now use function-like procedural macros in `extern` blocks and in
type positions. e.g. `type Generated = macro!();`
- Function-like and attribute procedural macros can now emit
`macro_rules!` items, so you can now have your macros generate macros.
- The `meta` pattern matcher in `macro_rules!` now correctly matches the modern
attribute syntax. For example `(#[$m:meta])` now matches `#[attr]`,
`#[attr{tokens}]`, `#[attr[tokens]]`, and `#[attr(tokens)]`.
+ Compiler
- Added tier 3 support\* for the
`thumbv7neon-unknown-linux-musleabihf` target.
- Added tier 3 support for the
`aarch64-unknown-none-softfloat` target.
- Added tier 3 support for the `mips64-unknown-linux-muslabi64`, and
`mips64el-unknown-linux-muslabi64` targets.
+ Libraries
- The `is_power_of_two` method on unsigned numeric types is now a `const` function.
+ Stabilized APIs
- BTreeMap::get_key_value
- HashMap::get_key_value
- Option::as_deref_mut
- Option::as_deref
- Option::flatten
- UdpSocket::peer_addr
- f32::to_be_bytes
- f32::to_le_bytes
- f32::to_ne_bytes
- f64::to_be_bytes
- f64::to_le_bytes
- f64::to_ne_bytes
- f32::from_be_bytes
- f32::from_le_bytes
- f32::from_ne_bytes
- f64::from_be_bytes
- f64::from_le_bytes
- f64::from_ne_bytes
- mem::take
- slice::repeat
- todo!
+ Cargo
- Cargo will now always display warnings, rather than only on
fresh builds.
- Feature flags (except `--all-features`) passed to a virtual workspace will
now produce an error. Previously these flags were ignored.
- You can now publish `dev-dependencies` without including
a `version`.
+ Misc
- You can now specify the `#[cfg(doctest)]` attribute to include an item only
when running documentation tests with `rustdoc`.
+ Compatibility Notes
- As previously announced, any previous NLL warnings in the 2015 edition are
now hard errors.
- The `include!` macro will now warn if it failed to include the
entire file. The `include!` macro unintentionally only includes the
first _expression_ in a file, and this can be unintuitive. This will become
either a hard error in a future release, or the behavior may be fixed to include all expressions as expected.
- Using `#[inline]` on function prototypes and consts now emits a warning under
`unused_attribute` lint. Using `#[inline]` anywhere else inside traits
or `extern` blocks now correctly emits a hard error.
-------------------------------------------------------------------
Mon Dec 30 03:42:44 UTC 2019 - opensuse-packaging@opensuse.org
- Rebased patches:
+ hopefully-fix-rustdoc-build.patch dropped (merged upstream)
-------------------------------------------------------------------
Fri Nov 29 14:43:11 UTC 2019 - Neal Gompa <ngompa13@gmail.com>
@ -70,17 +152,17 @@ Mon Sep 30 02:46:51 UTC 2019 - Luke Jones <luke@ljones.dev>
+ Libraries
- `ascii::EscapeDefault` now implements `Clone` and `Display`.
- Derive macros for prelude traits (e.g. `Clone`, `Debug`, `Hash`) are now
available at the same path as the trait. (e.g. The `Clone` derive macro
is available at `std::clone::Clone`). This also makes all built-in macros
available in `std`/`core` root. e.g. `std::include_bytes!`.
available at the same path as the trait. (e.g. The `Clone` derive macro
is available at `std::clone::Clone`). This also makes all built-in macros
available in `std`/`core` root. e.g. `std::include_bytes!`.
- `str::Chars` now implements `Debug`.
- `slice::{concat, connect, join}` now accepts `&[T]` in addition to `&T`.
- `*const T` and `*mut T` now implement `marker::Unpin`.
- `Arc<[T]>` and `Rc<[T]>` now implement `FromIterator<T>`.
- Added euclidean remainder and division operations (`div_euclid`,
`rem_euclid`) to all numeric primitives. Additionally `checked`,
`overflowing`, and `wrapping` versions are available for all
integer primitives.
`rem_euclid`) to all numeric primitives. Additionally `checked`,
`overflowing`, and `wrapping` versions are available for all
integer primitives.
- `thread::AccessError` now implements `Clone`, `Copy`, `Eq`, `Error`, and
`PartialEq`.
- `iter::{StepBy, Peekable, Take}` now implement `DoubleEndedIterator`.
@ -482,17 +564,17 @@ Sat Mar 2 05:17:36 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
expression. E.g.
```
enum Creature {
Crab(String),
Lobster(String),
Person(String),
Crab(String),
Lobster(String),
Person(String),
}
fn main() {
let state = Creature::Crab("Ferris");
let state = Creature::Crab("Ferris");
if let Creature::Crab(name) | Creature::Person(name) = state {
println!("This creature's name is: {}", name);
}
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
@ -504,7 +586,7 @@ Sat Mar 2 05:17:36 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
```
const unsafe fn foo() -> i32 { 5 }
const fn bar() -> i32 {
unsafe { foo() }
unsafe { foo() }
}
```
- You can now specify multiple attributes in a `cfg_attr` attribute.
@ -654,24 +736,24 @@ Thu Jan 17 21:22:11 UTC 2019 - Luke Jones <jones_ld@protonmail.com>
struct Point(i32, i32);
impl Point {
pub fn new(x: i32, y: i32) -> Self {
Self(x, y)
}
pub fn new(x: i32, y: i32) -> Self {
Self(x, y)
}
pub fn is_origin(&self) -> bool {
match self {
Self(0, 0) => true,
_ => false,
}
}
pub fn is_origin(&self) -> bool {
match self {
Self(0, 0) => true,
_ => false,
}
}
}
- Self can also now be used in type definitions. E.g.
enum List<T>
where
Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
Self: PartialOrd<Self> // can write `Self` instead of `List<T>`
{
Nil,
Cons(T, Box<Self>) // likewise here
Nil,
Cons(T, Box<Self>) // likewise here
}
- You can now mark traits with `#[must_use]`. This provides a warning if
a `impl Trait` or `dyn Trait` is returned and unused in the program.
@ -1118,11 +1200,11 @@ Update to version 1.30.0 (2018-10-25)
trait Trait {}
impl Trait + Send {
fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
fn test(&self) { println!("one"); } //~ ERROR duplicate definitions with name `test`
}
impl Trait + Send + Send {
fn test(&self) { println!("two"); }
fn test(&self) { println!("two"); }
}
- Update to version 1.27.2:
+ Compatibility Notes
@ -2026,47 +2108,47 @@ Mon Feb 6 08:25:17 UTC 2017 - luke.nukem.jones@gmail.com
- Update to 1.15.0
- Language updates
* Basic procedural macros allowing custom `#[derive]`, aka "macros 1.1", are
stable. This allows popular code-generating crates like Serde and Diesel to
work ergonomically. [RFC 1681].
* [Tuple structs may be empty. Unary and empty tuple structs may be instantiated
with curly braces][36868]. Part of [RFC 1506].
* [A number of minor changes to name resolution have been activated][37127].
They add up to more consistent semantics, allowing for future evolution of
Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
details of what is different. The breaking changes here have been transitioned
through the [`legacy_imports`] lint since 1.14, with no known regressions.
* [In `macro_rules`, `path` fragments can now be parsed as type parameter
bounds][38279]
* [`?Sized` can be used in `where` clauses][37791]
* [There is now a limit on the size of monomorphized types and it can be
modified with the `#![type_size_limit]` crate attribute, similarly to
the `#![recursion_limit]` attribute][37789]
* Basic procedural macros allowing custom `#[derive]`, aka "macros 1.1", are
stable. This allows popular code-generating crates like Serde and Diesel to
work ergonomically. [RFC 1681].
* [Tuple structs may be empty. Unary and empty tuple structs may be instantiated
with curly braces][36868]. Part of [RFC 1506].
* [A number of minor changes to name resolution have been activated][37127].
They add up to more consistent semantics, allowing for future evolution of
Rust macros. Specified in [RFC 1560], see its section on ["changes"] for
details of what is different. The breaking changes here have been transitioned
through the [`legacy_imports`] lint since 1.14, with no known regressions.
* [In `macro_rules`, `path` fragments can now be parsed as type parameter
bounds][38279]
* [`?Sized` can be used in `where` clauses][37791]
* [There is now a limit on the size of monomorphized types and it can be
modified with the `#![type_size_limit]` crate attribute, similarly to
the `#![recursion_limit]` attribute][37789]
- Compiler changes
* [On Windows, the compiler will apply dllimport attributes when linking to
extern functions][37973]. Additional attributes and flags can control which
library kind is linked and its name. [RFC 1717].
* [Rust-ABI symbols are no longer exported from cdylibs][38117]
* [The `--test` flag works with procedural macro crates][38107]
* [Fix `extern "aapcs" fn` ABI][37814]
* [The `-C no-stack-check` flag is deprecated][37636]. It does nothing.
* [The `format!` expander recognizes incorrect `printf` and shell-style
formatting directives and suggests the correct format][37613].
* [Only report one error for all unused imports in an import list][37456]
* [On Windows, the compiler will apply dllimport attributes when linking to
extern functions][37973]. Additional attributes and flags can control which
library kind is linked and its name. [RFC 1717].
* [Rust-ABI symbols are no longer exported from cdylibs][38117]
* [The `--test` flag works with procedural macro crates][38107]
* [Fix `extern "aapcs" fn` ABI][37814]
* [The `-C no-stack-check` flag is deprecated][37636]. It does nothing.
* [The `format!` expander recognizes incorrect `printf` and shell-style
formatting directives and suggests the correct format][37613].
* [Only report one error for all unused imports in an import list][37456]
- Compiler performance
* [Avoid unnecessary `mk_ty` calls in `Ty::super_fold_with`][37705]
* [Avoid more unnecessary `mk_ty` calls in `Ty::super_fold_with`][37979]
* [Don't clone in `UnificationTable::probe`][37848]
* [Remove `scope_auxiliary` to cut RSS by 10%][37764]
* [Use small vectors in type walker][37760]
* [Macro expansion performance was improved][37701]
* [Change `HirVec<P<T>>` to `HirVec<T>` in `hir::Expr`][37642]
* [Replace FNV with a faster hash function][37229]
* [Avoid unnecessary `mk_ty` calls in `Ty::super_fold_with`][37705]
* [Avoid more unnecessary `mk_ty` calls in `Ty::super_fold_with`][37979]
* [Don't clone in `UnificationTable::probe`][37848]
* [Remove `scope_auxiliary` to cut RSS by 10%][37764]
* [Use small vectors in type walker][37760]
* [Macro expansion performance was improved][37701]
* [Change `HirVec<P<T>>` to `HirVec<T>` in `hir::Expr`][37642]
* [Replace FNV with a faster hash function][37229]
- For full change list, please see
https://raw.githubusercontent.com/rust-lang/rust/master/RELEASES.md
https://raw.githubusercontent.com/rust-lang/rust/master/RELEASES.md
-------------------------------------------------------------------
Tue Jan 31 09:41:33 UTC 2017 - luke.nukem.jones@gmail.com

View File

@ -17,12 +17,12 @@
#
%global version_current 1.39.0
%global version_previous 1.38.0
%global version_bootstrap 1.38.0
%global version_current 1.40.0
%global version_previous 1.39.0
%global version_bootstrap 1.39.0
# some sub-packages are versioned independently
%global rustfmt_version 1.4.8
%global rustfmt_version 1.4.9
%global clippy_version 0.0.212
# Build the rust target triple.
@ -136,7 +136,6 @@ 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
Patch1: hopefully-fix-rustdoc-build.patch
BuildRequires: ccache
BuildRequires: curl
BuildRequires: fdupes
@ -387,7 +386,6 @@ This package includes HTML documentation for Cargo.
%setup -q -n rustc-%{version}-src
%patch0 -p1
%patch1 -p1
# use python3
sed -i -e "1s|#!.*|#!%{_bindir}/python3|" x.py
@ -400,11 +398,12 @@ rm -rf src/tools/clang
rm -rf src/tools/lld
rm -rf src/tools/lldb
# CI tooling won't be used
rm -rf src/stdsimd/ci
rm -rf src/ci
# Remove hidden files from source
find src/ -type f -name '.appveyor.yml' -exec rm -v '{}' '+'
find src/ -type f -name '.travis.yml' -exec rm -v '{}' '+'
find src/ -type f -name '.cirrus.yml' -exec rm -v '{}' '+'
%if !%with bundled_llvm
rm -rf src/llvm/

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b0dbb356070687a606034f71dc032b783bbf8b5d3f9fff39f2c1fbc4f171c29
size 96495140

3
rustc-1.40.0-src.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6e2aa3a91697f4b225c6b394cbae6b97666f061dba491f666a5281698fe2aace
size 92306352