Update to 1.35.0.
This commit is contained in:
parent
daa1d071bf
commit
3edbbaee75
8
.gitignore
vendored
8
.gitignore
vendored
@ -196,3 +196,11 @@
|
||||
/rust-1.33.0-x86_64-unknown-linux-gnu.tar.xz
|
||||
/rustc-1.34.1-src.tar.xz
|
||||
/rustc-1.34.2-src.tar.xz
|
||||
/rustc-1.35.0-src.tar.xz
|
||||
/rust-1.34.2-aarch64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.34.2-armv7-unknown-linux-gnueabihf.tar.xz
|
||||
/rust-1.34.2-i686-unknown-linux-gnu.tar.xz
|
||||
/rust-1.34.2-powerpc64le-unknown-linux-gnu.tar.xz
|
||||
/rust-1.34.2-powerpc64-unknown-linux-gnu.tar.xz
|
||||
/rust-1.34.2-s390x-unknown-linux-gnu.tar.xz
|
||||
/rust-1.34.2-x86_64-unknown-linux-gnu.tar.xz
|
||||
|
229
rust-pr61085-fix-ICE-with-incorrect-turbofish.patch
Normal file
229
rust-pr61085-fix-ICE-with-incorrect-turbofish.patch
Normal file
@ -0,0 +1,229 @@
|
||||
From 476732995c2f5dc08e20eb8f9f03c628a48f5f41 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Scherer <github35764891676564198441@oli-obk.de>
|
||||
Date: Thu, 23 May 2019 17:05:48 +0200
|
||||
Subject: [PATCH 1/3] WIP
|
||||
|
||||
---
|
||||
src/librustc_typeck/check/mod.rs | 22 +++++++++++-----------
|
||||
src/test/run-pass/issue-60989.rs | 4 ++++
|
||||
2 files changed, 15 insertions(+), 11 deletions(-)
|
||||
create mode 100644 src/test/run-pass/issue-60989.rs
|
||||
|
||||
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
|
||||
index 313ed19b945d..088729f12b1e 100644
|
||||
--- a/src/librustc_typeck/check/mod.rs
|
||||
+++ b/src/librustc_typeck/check/mod.rs
|
||||
@@ -5396,17 +5396,6 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
|
||||
let tcx = self.tcx;
|
||||
|
||||
- match def {
|
||||
- Def::Local(nid) | Def::Upvar(nid, ..) => {
|
||||
- let hid = self.tcx.hir().node_to_hir_id(nid);
|
||||
- let ty = self.local_ty(span, hid).decl_ty;
|
||||
- let ty = self.normalize_associated_types_in(span, &ty);
|
||||
- self.write_ty(hir_id, ty);
|
||||
- return (ty, def);
|
||||
- }
|
||||
- _ => {}
|
||||
- }
|
||||
-
|
||||
let (def, def_id, ty) = self.rewrite_self_ctor(def, span);
|
||||
let path_segs = AstConv::def_ids_for_path_segments(self, segments, self_ty, def);
|
||||
|
||||
@@ -5469,6 +5458,17 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
user_self_ty = None;
|
||||
}
|
||||
|
||||
+ match def {
|
||||
+ Def::Local(nid) | Def::Upvar(nid, ..) => {
|
||||
+ let hid = self.tcx.hir().node_to_hir_id(nid);
|
||||
+ let ty = self.local_ty(span, hid).decl_ty;
|
||||
+ let ty = self.normalize_associated_types_in(span, &ty);
|
||||
+ self.write_ty(hir_id, ty);
|
||||
+ return (ty, def);
|
||||
+ }
|
||||
+ _ => {}
|
||||
+ }
|
||||
+
|
||||
// Now we have to compare the types that the user *actually*
|
||||
// provided against the types that were *expected*. If the user
|
||||
// did not provide any types, then we want to substitute inference
|
||||
diff --git a/src/test/run-pass/issue-60989.rs b/src/test/run-pass/issue-60989.rs
|
||||
new file mode 100644
|
||||
index 000000000000..efaa74da3baa
|
||||
--- /dev/null
|
||||
+++ b/src/test/run-pass/issue-60989.rs
|
||||
@@ -0,0 +1,4 @@
|
||||
+fn main() {
|
||||
+ let c1 = ();
|
||||
+ c1::<()>;
|
||||
+}
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 97f204e6ae43bfe0fed64221d709a194bef728a4 Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Scherer <github35764891676564198441@oli-obk.de>
|
||||
Date: Thu, 23 May 2019 17:21:32 +0200
|
||||
Subject: [PATCH 2/3] Make regression test a compile-fail test
|
||||
|
||||
---
|
||||
src/test/{run-pass => compile-fail}/issue-60989.rs | 0
|
||||
1 file changed, 0 insertions(+), 0 deletions(-)
|
||||
rename src/test/{run-pass => compile-fail}/issue-60989.rs (100%)
|
||||
|
||||
diff --git a/src/test/run-pass/issue-60989.rs b/src/test/compile-fail/issue-60989.rs
|
||||
similarity index 100%
|
||||
rename from src/test/run-pass/issue-60989.rs
|
||||
rename to src/test/compile-fail/issue-60989.rs
|
||||
--
|
||||
2.21.0
|
||||
|
||||
|
||||
From 6e81f8205a6d47648d086d26e96bf05e962e3715 Mon Sep 17 00:00:00 2001
|
||||
From: Eduard-Mihai Burtescu <edy.burt@gmail.com>
|
||||
Date: Thu, 23 May 2019 19:23:00 +0300
|
||||
Subject: [PATCH 3/3] rustc_typeck: don't produce a `DefId` or `Ty` from
|
||||
`rewrite_self_ctor`, only a `Def`.
|
||||
|
||||
---
|
||||
src/librustc_typeck/check/mod.rs | 30 ++++++++++++++++++----------
|
||||
src/test/compile-fail/issue-60989.rs | 4 ----
|
||||
src/test/ui/issue-60989.rs | 18 +++++++++++++++++
|
||||
src/test/ui/issue-60989.stderr | 15 ++++++++++++++
|
||||
4 files changed, 52 insertions(+), 15 deletions(-)
|
||||
delete mode 100644 src/test/compile-fail/issue-60989.rs
|
||||
create mode 100644 src/test/ui/issue-60989.rs
|
||||
create mode 100644 src/test/ui/issue-60989.stderr
|
||||
|
||||
diff --git a/src/librustc_typeck/check/mod.rs b/src/librustc_typeck/check/mod.rs
|
||||
index 088729f12b1e..b6adcdbf35e9 100644
|
||||
--- a/src/librustc_typeck/check/mod.rs
|
||||
+++ b/src/librustc_typeck/check/mod.rs
|
||||
@@ -5330,7 +5330,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
}
|
||||
|
||||
// Rewrite `SelfCtor` to `Ctor`
|
||||
- pub fn rewrite_self_ctor(&self, def: Def, span: Span) -> (Def, DefId, Ty<'tcx>) {
|
||||
+ pub fn rewrite_self_ctor(&self, def: Def, span: Span) -> Def {
|
||||
let tcx = self.tcx;
|
||||
if let Def::SelfCtor(impl_def_id) = def {
|
||||
let ty = self.impl_self_ty(span, impl_def_id).ty;
|
||||
@@ -5340,8 +5340,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
Some(adt_def) if adt_def.has_ctor() => {
|
||||
let variant = adt_def.non_enum_variant();
|
||||
let ctor_def_id = variant.ctor_def_id.unwrap();
|
||||
- let def = Def::Ctor(ctor_def_id, CtorOf::Struct, variant.ctor_kind);
|
||||
- (def, ctor_def_id, tcx.type_of(ctor_def_id))
|
||||
+ Def::Ctor(ctor_def_id, CtorOf::Struct, variant.ctor_kind)
|
||||
}
|
||||
_ => {
|
||||
let mut err = tcx.sess.struct_span_err(span,
|
||||
@@ -5364,16 +5363,11 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
}
|
||||
err.emit();
|
||||
|
||||
- (def, impl_def_id, tcx.types.err)
|
||||
+ def
|
||||
}
|
||||
}
|
||||
} else {
|
||||
- let def_id = def.def_id();
|
||||
-
|
||||
- // The things we are substituting into the type should not contain
|
||||
- // escaping late-bound regions, and nor should the base type scheme.
|
||||
- let ty = tcx.type_of(def_id);
|
||||
- (def, def_id, ty)
|
||||
+ def
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5396,7 +5390,7 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
|
||||
let tcx = self.tcx;
|
||||
|
||||
- let (def, def_id, ty) = self.rewrite_self_ctor(def, span);
|
||||
+ let def = self.rewrite_self_ctor(def, span);
|
||||
let path_segs = AstConv::def_ids_for_path_segments(self, segments, self_ty, def);
|
||||
|
||||
let mut user_self_ty = None;
|
||||
@@ -5501,6 +5495,20 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
||||
tcx.generics_of(*def_id).has_self
|
||||
}).unwrap_or(false);
|
||||
|
||||
+ let (def_id, ty) = if let Def::SelfCtor(impl_def_id) = def {
|
||||
+ // NOTE(eddyb) an error has already been emitted by `rewrite_self_ctor`,
|
||||
+ // avoid using the wrong type here. This isn't in `rewrite_self_ctor`
|
||||
+ // itself because that runs too early (see #60989).
|
||||
+ (impl_def_id, tcx.types.err)
|
||||
+ } else {
|
||||
+ let def_id = def.def_id();
|
||||
+
|
||||
+ // The things we are substituting into the type should not contain
|
||||
+ // escaping late-bound regions, and nor should the base type scheme.
|
||||
+ let ty = tcx.type_of(def_id);
|
||||
+ (def_id, ty)
|
||||
+ };
|
||||
+
|
||||
let substs = AstConv::create_substs_for_generic_args(
|
||||
tcx,
|
||||
def_id,
|
||||
diff --git a/src/test/compile-fail/issue-60989.rs b/src/test/compile-fail/issue-60989.rs
|
||||
deleted file mode 100644
|
||||
index efaa74da3baa..000000000000
|
||||
--- a/src/test/compile-fail/issue-60989.rs
|
||||
+++ /dev/null
|
||||
@@ -1,4 +0,0 @@
|
||||
-fn main() {
|
||||
- let c1 = ();
|
||||
- c1::<()>;
|
||||
-}
|
||||
diff --git a/src/test/ui/issue-60989.rs b/src/test/ui/issue-60989.rs
|
||||
new file mode 100644
|
||||
index 000000000000..930e98bedce8
|
||||
--- /dev/null
|
||||
+++ b/src/test/ui/issue-60989.rs
|
||||
@@ -0,0 +1,18 @@
|
||||
+struct A {}
|
||||
+struct B {}
|
||||
+
|
||||
+impl From<A> for B {
|
||||
+ fn from(a: A) -> B {
|
||||
+ B{}
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fn main() {
|
||||
+ let c1 = ();
|
||||
+ c1::<()>;
|
||||
+ //~^ ERROR type arguments are not allowed for this type
|
||||
+
|
||||
+ let c1 = A {};
|
||||
+ c1::<Into<B>>;
|
||||
+ //~^ ERROR type arguments are not allowed for this type
|
||||
+}
|
||||
diff --git a/src/test/ui/issue-60989.stderr b/src/test/ui/issue-60989.stderr
|
||||
new file mode 100644
|
||||
index 000000000000..55a0b9626df7
|
||||
--- /dev/null
|
||||
+++ b/src/test/ui/issue-60989.stderr
|
||||
@@ -0,0 +1,15 @@
|
||||
+error[E0109]: type arguments are not allowed for this type
|
||||
+ --> $DIR/issue-60989.rs:12:10
|
||||
+ |
|
||||
+LL | c1::<()>;
|
||||
+ | ^^ type argument not allowed
|
||||
+
|
||||
+error[E0109]: type arguments are not allowed for this type
|
||||
+ --> $DIR/issue-60989.rs:16:10
|
||||
+ |
|
||||
+LL | c1::<Into<B>>;
|
||||
+ | ^^^^^^^ type argument not allowed
|
||||
+
|
||||
+error: aborting due to 2 previous errors
|
||||
+
|
||||
+For more information about this error, try `rustc --explain E0109`.
|
||||
--
|
||||
2.21.0
|
||||
|
36
rust.spec
36
rust.spec
@ -9,10 +9,10 @@
|
||||
# e.g. 1.10.0 wants rustc: 1.9.0-2016-05-24
|
||||
# or nightly wants some beta-YYYY-MM-DD
|
||||
# Note that cargo matches the program version here, not its crate version.
|
||||
%global bootstrap_rust 1.33.0
|
||||
%global bootstrap_cargo 1.33.0
|
||||
%global bootstrap_channel %{bootstrap_rust}
|
||||
%global bootstrap_date 2019-02-28
|
||||
%global bootstrap_rust 1.34.0
|
||||
%global bootstrap_cargo 1.34.0
|
||||
%global bootstrap_channel 1.34.2
|
||||
%global bootstrap_date 2019-05-14
|
||||
|
||||
# Only the specified arches will use bootstrap binaries.
|
||||
#global bootstrap_arches %%{rust_arches}
|
||||
@ -40,20 +40,15 @@
|
||||
%bcond_with bundled_libssh2
|
||||
%endif
|
||||
|
||||
# LLDB only works on some architectures
|
||||
%ifarch %{arm} aarch64 %{ix86} x86_64
|
||||
# LLDB isn't available everywhere...
|
||||
%if !0%{?rhel}
|
||||
%bcond_without lldb
|
||||
%else
|
||||
%bcond_with lldb
|
||||
%endif
|
||||
%else
|
||||
%bcond_with lldb
|
||||
%endif
|
||||
|
||||
Name: rust
|
||||
Version: 1.34.2
|
||||
Version: 1.35.0
|
||||
Release: 1%{?dist}
|
||||
Summary: The Rust Programming Language
|
||||
License: (ASL 2.0 or MIT) and (BSD and MIT)
|
||||
@ -75,6 +70,9 @@ Patch1: rust-pr57840-llvm7-debuginfo-variants.patch
|
||||
# https://github.com/rust-lang/rust/pull/60313
|
||||
Patch2: 0001-Limit-internalization-in-LLVM-8-ThinLTO.patch
|
||||
|
||||
# https://github.com/rust-lang/rust/pull/61085
|
||||
Patch3: rust-pr61085-fix-ICE-with-incorrect-turbofish.patch
|
||||
|
||||
# Get the Rust triple for any arch.
|
||||
%{lua: function rust_triple(arch)
|
||||
local abi = "gnu"
|
||||
@ -262,10 +260,7 @@ programs.
|
||||
|
||||
%package lldb
|
||||
Summary: LLDB pretty printers for Rust
|
||||
|
||||
# It could be noarch, but lldb has limited availability
|
||||
#BuildArch: noarch
|
||||
|
||||
BuildArch: noarch
|
||||
Requires: lldb
|
||||
Requires: python2-lldb
|
||||
Requires: %{name}-debugger-common = %{version}-%{release}
|
||||
@ -400,6 +395,7 @@ test -f '%{local_rust_root}/bin/rustc'
|
||||
|
||||
%patch1 -p1 -R
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
|
||||
%if "%{python}" == "python3"
|
||||
sed -i.try-py3 -e '/try python2.7/i try python3 "$@"' ./configure
|
||||
@ -469,6 +465,13 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
%define enable_debuginfo --enable-debuginfo --disable-debuginfo-only-std --enable-debuginfo-tools --disable-debuginfo-lines
|
||||
%endif
|
||||
|
||||
# We want the best optimization for std, but it caused problems for rpm-ostree
|
||||
# on ppc64le to have all of the compiler_builtins in a single object:
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=1713090
|
||||
%ifnarch %{power64}
|
||||
%define codegen_units_std --set rust.codegen-units-std=1
|
||||
%endif
|
||||
|
||||
%configure --disable-option-checking \
|
||||
--libdir=%{common_libdir} \
|
||||
--build=%{rust_triple} --host=%{rust_triple} --target=%{rust_triple} \
|
||||
@ -481,7 +484,7 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1
|
||||
--enable-extended \
|
||||
--enable-vendor \
|
||||
--enable-verbose-tests \
|
||||
--set rust.codegen-units-std=1 \
|
||||
%{?codegen_units_std} \
|
||||
--release-channel=%{channel}
|
||||
|
||||
%{python} ./x.py build
|
||||
@ -676,6 +679,9 @@ rm -f %{buildroot}%{rustlibdir}/etc/lldb_*.py*
|
||||
|
||||
|
||||
%changelog
|
||||
* Thu May 23 2019 Josh Stone <jistone@redhat.com> - 1.35.0-1
|
||||
- Update to 1.35.0.
|
||||
|
||||
* Tue May 14 2019 Josh Stone <jistone@redhat.com> - 1.34.2-1
|
||||
- Update to 1.34.2 -- fixes CVE-2019-12083.
|
||||
|
||||
|
2
sources
2
sources
@ -1 +1 @@
|
||||
SHA512 (rustc-1.34.2-src.tar.xz) = f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
|
||||
SHA512 (rustc-1.35.0-src.tar.xz) = 477c10b780bd54776be7ecbda0ab970416253e4a87c3e701825a7d07bcbcd91601b8e61129c5d04d4259e89c2e81e87cdbdee853375a8de5c9cf8372be2c9129
|
||||
|
@ -1,8 +1,8 @@
|
||||
SHA512 (rustc-1.34.2-src.tar.xz) = f1bd2b226d90aae8a4657e6117b9a8451d4ce8129f79cc0fce0da7613a3b7800e690bc0ede8fec20a2f5f32c13fa8e22ac97d3838e0d36936793535a75d9c381
|
||||
SHA512 (rust-1.33.0-aarch64-unknown-linux-gnu.tar.xz) = 51f6ca909411fd3b3c05baedc38be8a29923966e7cd6960a10152886687132d4ef9750140c5121b9486d6f6ee1ed7ff35f8105c9f0731fe98ce750d0ea9c528f
|
||||
SHA512 (rust-1.33.0-armv7-unknown-linux-gnueabihf.tar.xz) = 25a16c576d826115fdac5a55b89bf3372dfb39c563f2ce7d39b0a7a3c9bdc43eaf10974dfa42e26c5aa04aee169ced3e797fa46fa82bd9f4ceddeddaf6687659
|
||||
SHA512 (rust-1.33.0-i686-unknown-linux-gnu.tar.xz) = f61f97c529232fd6d7587bbf34c41dd9cc334272b1d523464d7b964aba5a102edaff8d387445e3fdb2b9587c1cdd870e97b9572c9421e79ee047479443f1896d
|
||||
SHA512 (rust-1.33.0-powerpc64le-unknown-linux-gnu.tar.xz) = 393c808e93792cf2b126d6111834932a55cbf18339942ac0d20fc4a3692b0ac08c21a3c8fd393795f7aafecac5a2c5d7c9415c18017a7453f759f746045f5144
|
||||
SHA512 (rust-1.33.0-powerpc64-unknown-linux-gnu.tar.xz) = 7d53501d20119ba8d9723650800cdbde17e4ed1719f6258c48c25113082e0400d9ac74ca1bfca54722dbb2049f7b5d34177bb613031c1611daa2545e1706c745
|
||||
SHA512 (rust-1.33.0-s390x-unknown-linux-gnu.tar.xz) = 755a0203e2c143386cb3729faada4d2c38b254dfa7e6eeb722ec9847d6319a1d3d289c7b77a2bc478d79dbbabfcd826d8b015acd29fbdf5acb591feae1876205
|
||||
SHA512 (rust-1.33.0-x86_64-unknown-linux-gnu.tar.xz) = b7f3087f34e99517cd729f5ff1f8cce3f3254cb36c734d5b90d878293e4406934c2f597bf7e2941e9257046f62c9274eb4769a64dabfbc5f0bbf2a1703f7fef8
|
||||
SHA512 (rustc-1.35.0-src.tar.xz) = 477c10b780bd54776be7ecbda0ab970416253e4a87c3e701825a7d07bcbcd91601b8e61129c5d04d4259e89c2e81e87cdbdee853375a8de5c9cf8372be2c9129
|
||||
SHA512 (rust-1.34.2-aarch64-unknown-linux-gnu.tar.xz) = 7103362b8840d094661a16053d8f07eba413c369bf3a2b686313875aa97c30b35697fceefbfc90dffd5cfd4de946e7f848f2b791736443639b30bb75709b7122
|
||||
SHA512 (rust-1.34.2-armv7-unknown-linux-gnueabihf.tar.xz) = fe5be9a345d10ee2b3a47986977be91cd2dd94f2076571f810ac21cea36f79f073eb16915c090861cf46c6835f86db64c2ed1ef036f911b3be829d7927ecb747
|
||||
SHA512 (rust-1.34.2-i686-unknown-linux-gnu.tar.xz) = 056243d226cd9a36dfcd266f2aba88adde58dbcfa87f20613183c5dcc514bb413e25f6d6963494dc141f4e91649b17b1db91e6a9d313af7ef7b1893b64337c33
|
||||
SHA512 (rust-1.34.2-powerpc64le-unknown-linux-gnu.tar.xz) = 3c881e7bcf622237f279855ebaeb544f4df9bfe5bc1f74578093d67befed8f027692ea56dc773c653bef8a124e9ebac2544d0c197a0e3a1ec8da63ef9d434412
|
||||
SHA512 (rust-1.34.2-powerpc64-unknown-linux-gnu.tar.xz) = d1ab37d68c0b52e3780ea133f8ba4d5b823c7f874bbf15f97f304c21405b1fdbde3d28e83381f08095fca8e2ea615f46accad725ee854ad9db168ab4629e30a3
|
||||
SHA512 (rust-1.34.2-s390x-unknown-linux-gnu.tar.xz) = 181f58b00cdccb205be853f5d00fc0a0c939b7e4dc801717b21ece0f714a8f3b501f1196eb2e3f3081932a0417a6218763c3d095cdd036e9f202cc41291876a1
|
||||
SHA512 (rust-1.34.2-x86_64-unknown-linux-gnu.tar.xz) = 64d6b7da08ffd877c10d819605a37b0bc178c4ab80e2f7449f3d5ac9254a438e148da3729408b4c9429ed499d7f142c9d2926f5c916e0a32bebaaefe4b0a09a6
|
||||
|
Loading…
Reference in New Issue
Block a user