Skip to content

Commit

Permalink
Update rust to version 1.39.0.
Browse files Browse the repository at this point in the history
Pkgsrc changes:
 * Remove patch which no longer applies (but what about RPATH?)
 * Adapt a few patches to changed files upstream.

Upstream changes:

Version 1.39.0 (2019-11-07)
===========================

Language
--------
- [You can now create `async` functions and blocks with `async fn`,
  `async move {}`, and `async {}` respectively, and you can now call
  `.await` on async expressions.][63209]
- [You can now use certain attributes on function, closure, and function
  pointer parameters.][64010] These attributes include `cfg`, `cfg_attr`,
  `allow`, `warn`, `deny`, `forbid` as well as inert helper attributes used
  by procedural macro attributes applied to items. e.g.
  ```rust
  fn len(
      #[cfg(windows)] slice: &[u16],
      #[cfg(not(windows))] slice: &[u8],
  ) -> usize {
      slice.len()
  }
  ```
- [You can now take shared references to bind-by-move patterns in the
  `if` guards of `match` arms.][63118] e.g.
  ```rust
  fn main() {
      let array: Box<[u8; 4]> = Box::new([1, 2, 3, 4]);

      match array {
          nums
  //      ---- `nums` is bound by move.
              if nums.iter().sum::<u8>() == 10
  //                 ^------ `.iter()` implicitly takes a reference to `nums`.
          => {
              drop(nums);
  //          ----------- Legal as `nums` was bound by move and so we have ownership.
          }
          _ => unreachable!(),
      }
  }
  ```

Compiler
--------
- [Added tier 3\* support for the `i686-unknown-uefi` target.][64334]
- [Added tier 3 support for the `sparc64-unknown-openbsd` target.][63595]
- [rustc will now trim code snippets in diagnostics to fit in your terminal.]
  [63402] **Note** Cargo currently doesn't use this feature. Refer to
  [cargo#7315][cargo/7315] to track this feature's progress.
- [You can now pass `--show-output` argument to test binaries to print the
  output of successful tests.][62600]

\* Refer to Rust's [platform support page][forge-platform-support] for more
information on Rust's tiered platform support.

Libraries
---------
- [`Vec::new` and `String::new` are now `const` functions.][64028]
- [`LinkedList::new` is now a `const` function.][63684]
- [`str::len`, `[T]::len` and `str::as_bytes` are now `const` functions.][63770]
- [The `abs`, `wrapping_abs`, and `overflowing_abs` numeric functions are
  now `const`.][63786]

Stabilized APIs
---------------
- [`Pin::into_inner`]
- [`Instant::checked_duration_since`]
- [`Instant::saturating_duration_since`]

Cargo
-----
- [You can now publish git dependencies if supplied with a `version`.]
  [cargo/7237]
- [The `--all` flag has been renamed to `--workspace`.][cargo/7241] Using
  `--all` is now deprecated.

Misc
----
- [You can now pass `-Clinker` to rustdoc to control the linker used
  for compiling doctests.][63834]

Compatibility Notes
-------------------
- [Code that was previously accepted by the old borrow checker, but rejected by
  the NLL borrow checker is now a hard error in Rust 2018.][63565] This was
  previously a warning, and will also become a hard error in the Rust 2015
  edition in the 1.40.0 release.
- [`rustdoc` now requires `rustc` to be installed and in the same directory to
  run tests.][63827] This should improve performance when running a large
  amount of doctests.
- [The `try!` macro will now issue a deprecation warning.][62672] It is
  recommended to use the `?` operator instead.
- [`asinh(-0.0)` now correctly returns `-0.0`.][63698] Previously this
  returned `0.0`.

[62600]: rust-lang/rust#62600
[62672]: rust-lang/rust#62672
[63118]: rust-lang/rust#63118
[63209]: rust-lang/rust#63209
[63402]: rust-lang/rust#63402
[63565]: rust-lang/rust#63565
[63595]: rust-lang/rust#63595
[63684]: rust-lang/rust#63684
[63698]: rust-lang/rust#63698
[63770]: rust-lang/rust#63770
[63786]: rust-lang/rust#63786
[63827]: rust-lang/rust#63827
[63834]: rust-lang/rust#63834
[63927]: rust-lang/rust#63927
[63933]: rust-lang/rust#63933
[63934]: rust-lang/rust#63934
[63938]: rust-lang/rust#63938
[63940]: rust-lang/rust#63940
[63941]: rust-lang/rust#63941
[63945]: rust-lang/rust#63945
[64010]: rust-lang/rust#64010
[64028]: rust-lang/rust#64028
[64334]: rust-lang/rust#64334
[cargo/7237]: rust-lang/cargo#7237
[cargo/7241]: rust-lang/cargo#7241
[cargo/7315]: rust-lang/cargo#7315
[`Pin::into_inner`]: https://doc.rust-lang.org/std/pin/struct.Pin.html#method.into_inner
[`Instant::checked_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.checked_duration_since
[`Instant::saturating_duration_since`]: https://doc.rust-lang.org/std/time/struct.Instant.html#method.saturating_duration_since
  • Loading branch information
he32 committed Nov 11, 2019
1 parent 7a9d673 commit f6910e5
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 59 deletions.
5 changes: 2 additions & 3 deletions lang/rust/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
# $NetBSD: Makefile,v 1.123 2019/11/03 19:04:07 rillig Exp $
# $NetBSD: Makefile,v 1.124 2019/11/11 09:09:11 he Exp $

DISTNAME= rustc-1.38.0-src
DISTNAME= rustc-1.39.0-src
PKGNAME= ${DISTNAME:S/rustc/rust/:S/-src//}
PKGREVISION= 1
CATEGORIES= lang
MASTER_SITES= http://static.rust-lang.org/dist/

Expand Down
33 changes: 16 additions & 17 deletions lang/rust/distinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: distinfo,v 1.91 2019/10/28 00:42:21 jperkin Exp $
$NetBSD: distinfo,v 1.92 2019/11/11 09:09:11 he Exp $

SHA1 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 91517fa95f954427c627cf63eb7c518abd068f3e
RMD160 (rust-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 06a3d922b27aac2deb570301542897a131b47cd0
Expand Down Expand Up @@ -48,10 +48,10 @@ SHA1 (rust-1.38.0-i686-unknown-netbsd.tar.gz) = 4f822144e65dafe45662caae04a89e8d
RMD160 (rust-1.38.0-i686-unknown-netbsd.tar.gz) = c2716a3b917a0e291cd25d1c12910f30ee4b9878
SHA512 (rust-1.38.0-i686-unknown-netbsd.tar.gz) = 8ccf290c34040c058f549fdd953e6e11568ca8e02585934ed896837b8be5ee241d56aa368ab3770cc74ce2e192a81918b478b07420443ed92c422c4327374212
Size (rust-1.38.0-i686-unknown-netbsd.tar.gz) = 341906414 bytes
SHA1 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = 2907c2601150ffdda2dda5e7dbc98778e1f80045
RMD160 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = b2679e49e7271a5b32e0fc472fee42808fdc6af2
SHA512 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = 24d901cb6094350535dac8f956989e9e80361286cf966a5b4cccc343c069255ecba9bb1bc151e3a7ca80795f056bcfe968604d0e21d6d820bfd085fc1fdf86aa
Size (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = 297828691 bytes
SHA1 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = 8dace3276e8be1ce9b0069170948e792e3f478f5
RMD160 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = e6614e4d4f22a4052e25eb91d68049509fb39098
SHA512 (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = bd38a40356b85b2d1acc668f5cc6bfc4f9aedeeceda74de5244827af0d5ea87a9a40240299fe0c8344682f62e8b179ca2cf4adfc8527280c6a51e919e06110cc
Size (rust-1.38.0-x86_64-unknown-netbsd.tar.gz) = 332473263 bytes
SHA1 (rust-std-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = b8a8913c95d9d7f8894cc5fbae7000d5cd5a8ca9
RMD160 (rust-std-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = 34753f2c4efe6bbec7044a1d417ef9f4586b50a0
SHA512 (rust-std-1.35.0-armv7-unknown-netbsd-eabihf.tar.gz) = ea834d454c8d23101d654de3611f07782a676a08f581c501152da13c617be1b08d09a3b1c0b4af34ea79d11b5c15b5a1ece7da8395f4def950b2add245e38f2e
Expand Down Expand Up @@ -96,26 +96,25 @@ SHA1 (rust-std-1.38.0-i686-unknown-netbsd.tar.gz) = 18a660129b5dc412f213b7c5d9bf
RMD160 (rust-std-1.38.0-i686-unknown-netbsd.tar.gz) = a43ebc439004d0d8a3e5c149a95025e088427821
SHA512 (rust-std-1.38.0-i686-unknown-netbsd.tar.gz) = cc0f250c021292405ea1043abbac8fc310c630d2c554fb58b4ebe7ca7b23fcf5c9d6553341282b661b15eb16958a3ccd0d7693707c4acb288cfa8f9fa08f1caa
Size (rust-std-1.38.0-i686-unknown-netbsd.tar.gz) = 204889878 bytes
SHA1 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = e821ae575d1f1e8b6c44af0bd0b59d814797029c
RMD160 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = a9877f182d72729891a7ba918ab551ce79d5f9f8
SHA512 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = 7e0e031c1e2a5864f8f4185171ae44cba28c1f51a22ed7b9a724bc3478c6bc6defffdacab10fd970947a2899716de86c7dc5b64fa434254ea7e6c4f38e271b12
Size (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = 217882197 bytes
SHA1 (rustc-1.38.0-src.tar.gz) = 6ad0f778882c73a689c88e1ecdaab8e7b9ceb27b
RMD160 (rustc-1.38.0-src.tar.gz) = 95edfbd142e87fd72f4b5b3aacdcfb42df4bca9a
SHA512 (rustc-1.38.0-src.tar.gz) = eef16fcbd234ffe76158dd971fcc10ca129816c47f84ff2f2fe424c42509c8661ab45458f968cd88bb8eb6bab028d5d86920a4dee1f673f48270e1f446ffa882
Size (rustc-1.38.0-src.tar.gz) = 152008577 bytes
SHA1 (patch-src_bootstrap_bin_rustc.rs) = 5e6b0cb25401db4fef6e74f73764e69f3c09569c
SHA1 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = 4316f27d90bf12d7dcc3e92dbdd7f5d8125c986e
RMD160 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = 6f20cdb3cb542485c94b1924e06c294c63ac63f3
SHA512 (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = abaab363a2995148493681f17306d6309cbe4c7d359b9ad1c961aa7e93692e60277ab0a98101d9da11fde1eb6097b42af074950c4359278f68247bb70bb3f11e
Size (rust-std-1.38.0-x86_64-unknown-netbsd.tar.gz) = 204274822 bytes
SHA1 (rustc-1.39.0-src.tar.gz) = 82ef6f3b88b8d5e3bfa2fab67bbacf5d6f6ba6bb
RMD160 (rustc-1.39.0-src.tar.gz) = d5b04b87fc336e3be7d592f70de0363aa66622aa
SHA512 (rustc-1.39.0-src.tar.gz) = 77be74410b9f7a2e9f78f7a9860964e122ab9518553acc2cc80d5abeecf3302e9b3ed1fd29e022cccff1f9ff4a568b4015c0d3ac0a524f06e38e9cb360a3341e
Size (rustc-1.39.0-src.tar.gz) = 152803201 bytes
SHA1 (patch-src_bootstrap_bootstrap.py) = 5b886b95857bf019c2e37cb380e6905cb444b756
SHA1 (patch-src_bootstrap_builder.rs) = 7e23348dc5555fdb3833a7f8734cfe687c6e533c
SHA1 (patch-src_bootstrap_lib.rs) = e585b99ea2eb587d5eeb11739b77cde9bf5ad085
SHA1 (patch-src_bootstrap_builder.rs) = f90a19cef1a53c4e7e24ab2ff441a618057efc8c
SHA1 (patch-src_bootstrap_lib.rs) = 59fc8949d98692550daba6f3e8119f71eed13fb2
SHA1 (patch-src_build__helper_lib.rs) = ef0b522e303f0490b86e64f40733c2ecb498da5b
SHA1 (patch-src_librustc__codegen__ssa_back_linker.rs) = e7c592f78b9ee317521cf0258686173a31f1d2e0
SHA1 (patch-src_librustc__llvm_build.rs) = 7cc2aa0568aa2cbf4eb1fdbb00922b10df0b3ff6
SHA1 (patch-src_librustc__target_spec_solaris__base.rs) = 21db8af802edecb5e35ce78ee9af7c4935b4040f
SHA1 (patch-src_librustc__target_spec_x86__64__sun__solaris.rs) = f6ad33b41906bbf83a1cbd0e2fe13a4da37266fa
SHA1 (patch-src_libstd_build.rs) = 9cfa91a11a575d5fef6d3e208864745a24770850
SHA1 (patch-src_libstd_sys_unix_thread.rs) = 2554f1a42afaa0ddce5053860f4dabecdf6c527a
SHA1 (patch-src_libunwind_build.rs) = c0a0aa9749705be07afe8eaaa0c7d70affa46566
SHA1 (patch-src_libunwind_build.rs) = 33fe6fd2027cb7070424e9a30c05438586b5c6b7
SHA1 (patch-src_llvm-project_llvm_CMakeLists.txt) = d49503d19c30a64d571eb7fa79e7aad7038cd427
SHA1 (patch-src_llvm-project_llvm_cmake_modules_AddLLVM.cmake) = c5e74d0e8deb555881ec94920a637b53b744c866
SHA1 (patch-src_llvm-project_llvm_include_llvm-c_DataTypes.h) = 7588a46aaa277ef04b33ac6d904b9d1d81579f2a
Expand Down
15 changes: 0 additions & 15 deletions lang/rust/patches/patch-src_bootstrap_bin_rustc.rs

This file was deleted.

6 changes: 3 additions & 3 deletions lang/rust/patches/patch-src_bootstrap_builder.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$NetBSD: patch-src_bootstrap_builder.rs,v 1.2 2019/03/03 09:16:21 he Exp $
$NetBSD: patch-src_bootstrap_builder.rs,v 1.3 2019/11/11 09:09:11 he Exp $

Do not install 'src'.

--- src/bootstrap/builder.rs.orig 2018-11-25 15:56:35.000000000 +0000
--- src/bootstrap/builder.rs.orig 2019-09-23 21:15:52.000000000 +0000
+++ src/bootstrap/builder.rs
@@ -464,7 +464,6 @@ impl<'a> Builder<'a> {
@@ -468,7 +468,6 @@ impl<'a> Builder<'a> {
install::Clippy,
install::Miri,
install::Analysis,
Expand Down
18 changes: 3 additions & 15 deletions lang/rust/patches/patch-src_bootstrap_lib.rs
Original file line number Diff line number Diff line change
@@ -1,31 +1,19 @@
$NetBSD: patch-src_bootstrap_lib.rs,v 1.5 2019/10/27 18:34:27 he Exp $
$NetBSD: patch-src_bootstrap_lib.rs,v 1.6 2019/11/11 09:09:11 he Exp $

Don't filter out optimization flags.
FreeBSD has a particular C++ runtime library name
Also, don't make warnings fatal -- 1.38.0 warns about a construct
when building 1.38.0, ref.
https://github.com/rust-lang/rust/issues/65722

--- src/bootstrap/lib.rs.orig 2019-01-16 09:30:27.000000000 +0000
+++ src/bootstrap/lib.rs
@@ -104,7 +104,7 @@
//! also check out the `src/bootstrap/README.md` file for more information.

// NO-RUSTC-WRAPPER
-#![deny(warnings, rust_2018_idioms, unused_lifetimes)]
+#![deny(rust_2018_idioms, unused_lifetimes)]

#![feature(core_intrinsics)]
#![feature(drain_filter)]
@@ -768,7 +768,6 @@ impl Build {
@@ -757,7 +757,6 @@ impl Build {
// cc-rs because the build scripts will determine that for themselves.
let mut base = self.cc[&target].args().iter()
.map(|s| s.to_string_lossy().into_owned())
- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
.collect::<Vec<String>>();

// If we're compiling on macOS then we add a few unconditional flags
@@ -779,6 +778,11 @@ impl Build {
@@ -768,6 +767,11 @@ impl Build {
base.push("-stdlib=libc++".into());
}

Expand Down
12 changes: 6 additions & 6 deletions lang/rust/patches/patch-src_libunwind_build.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
$NetBSD: patch-src_libunwind_build.rs,v 1.2 2019/03/07 20:19:11 jperkin Exp $
$NetBSD: patch-src_libunwind_build.rs,v 1.3 2019/11/11 09:09:11 he Exp $

fix build on NetBSD HEAD-llvm. XXX there is probably a better way to do this.

--- src/libunwind/build.rs.orig 2018-12-18 23:11:17.000000000 +0000
+++ src/libunwind/build.rs
@@ -25,7 +25,9 @@ fn main() {
@@ -21,7 +21,9 @@ fn main() {
} else if target.contains("rumprun") {
println!("cargo:rustc-link-lib=unwind");
} else if target.contains("netbsd") {
- println!("cargo:rustc-link-lib=gcc_s");
+ if !env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
+ if !env::var_os("PKGSRC_HAVE_LIBCPP").is_some() {
+ println!("cargo:rustc-link-lib=gcc_s");
+ }
+ }
} else if target.contains("openbsd") {
println!("cargo:rustc-link-lib=c++abi");
} else if target.contains("solaris") {
if target.contains("sparc64") {
println!("cargo:rustc-link-lib=gcc");

0 comments on commit f6910e5

Please sign in to comment.