diff --git a/src/ci/docker/cross/build-arm-musl.sh b/src/ci/docker/cross/build-arm-musl.sh index 567e5d9ac9863..f9444a35a8b79 100755 --- a/src/ci/docker/cross/build-arm-musl.sh +++ b/src/ci/docker/cross/build-arm-musl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/cross/build-rumprun.sh b/src/ci/docker/cross/build-rumprun.sh index 59b1c9b641535..ad38cf872ad07 100755 --- a/src/ci/docker/cross/build-rumprun.sh +++ b/src/ci/docker/cross/build-rumprun.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/cross/install-x86_64-redox.sh b/src/ci/docker/cross/install-x86_64-redox.sh index 8e052c4acd28a..9bfb57f5741c5 100755 --- a/src/ci/docker/cross/install-x86_64-redox.sh +++ b/src/ci/docker/cross/install-x86_64-redox.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/cross2/build-fuchsia-toolchain.sh b/src/ci/docker/cross2/build-fuchsia-toolchain.sh index 756013a235cc1..ef8f0c37f8c37 100755 --- a/src/ci/docker/cross2/build-fuchsia-toolchain.sh +++ b/src/ci/docker/cross2/build-fuchsia-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/cross2/build-solaris-toolchain.sh b/src/ci/docker/cross2/build-solaris-toolchain.sh index 71ab998aab20d..c04c8b7194c71 100755 --- a/src/ci/docker/cross2/build-solaris-toolchain.sh +++ b/src/ci/docker/cross2/build-solaris-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh b/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh index 3d58f3d307c76..2ebbe0cdee9b8 100755 --- a/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh +++ b/src/ci/docker/disabled/dist-x86_64-dragonfly/build-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh b/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh index 0776d448984ee..a1115e254b5b2 100755 --- a/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh +++ b/src/ci/docker/disabled/dist-x86_64-haiku/build-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh b/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh index 0f6034cdb8620..a37532e203aa4 100755 --- a/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh +++ b/src/ci/docker/disabled/dist-x86_64-haiku/fetch-packages.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/disabled/wasm32-exp/node.sh b/src/ci/docker/disabled/wasm32-exp/node.sh index dfa7f221ffa20..2bfddb0de99b0 100755 --- a/src/ci/docker/disabled/wasm32-exp/node.sh +++ b/src/ci/docker/disabled/wasm32-exp/node.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-aarch64-linux/build-toolchains.sh b/src/ci/docker/dist-aarch64-linux/build-toolchains.sh index 94f785c96f815..22b719bb30755 100755 --- a/src/ci/docker/dist-aarch64-linux/build-toolchains.sh +++ b/src/ci/docker/dist-aarch64-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-arm-linux/build-toolchains.sh b/src/ci/docker/dist-arm-linux/build-toolchains.sh index f78ecf9381a1f..c53cca0bb982c 100755 --- a/src/ci/docker/dist-arm-linux/build-toolchains.sh +++ b/src/ci/docker/dist-arm-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-armhf-linux/build-toolchains.sh b/src/ci/docker/dist-armhf-linux/build-toolchains.sh index df1134d5483c2..964182a5ad544 100755 --- a/src/ci/docker/dist-armhf-linux/build-toolchains.sh +++ b/src/ci/docker/dist-armhf-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-armv7-linux/build-toolchains.sh b/src/ci/docker/dist-armv7-linux/build-toolchains.sh index 2d395fee792ec..40adfe5d53e0b 100755 --- a/src/ci/docker/dist-armv7-linux/build-toolchains.sh +++ b/src/ci/docker/dist-armv7-linux/build-toolchains.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-freebsd/build-toolchain.sh b/src/ci/docker/dist-i686-freebsd/build-toolchain.sh index 8343327c33bf2..3c86a8e38175e 100755 --- a/src/ci/docker/dist-i686-freebsd/build-toolchain.sh +++ b/src/ci/docker/dist-i686-freebsd/build-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-binutils.sh b/src/ci/docker/dist-i686-linux/build-binutils.sh index 80aa1f2a01613..f4bdbd80d0edb 100755 --- a/src/ci/docker/dist-i686-linux/build-binutils.sh +++ b/src/ci/docker/dist-i686-linux/build-binutils.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-cmake.sh b/src/ci/docker/dist-i686-linux/build-cmake.sh index 82e46455cb0f0..9a3763d421ad2 100755 --- a/src/ci/docker/dist-i686-linux/build-cmake.sh +++ b/src/ci/docker/dist-i686-linux/build-cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-curl.sh b/src/ci/docker/dist-i686-linux/build-curl.sh index b7d22755a571b..edf3175b81c43 100755 --- a/src/ci/docker/dist-i686-linux/build-curl.sh +++ b/src/ci/docker/dist-i686-linux/build-curl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-gcc.sh b/src/ci/docker/dist-i686-linux/build-gcc.sh index ab2562538d6d7..6b991bb59e4b0 100755 --- a/src/ci/docker/dist-i686-linux/build-gcc.sh +++ b/src/ci/docker/dist-i686-linux/build-gcc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-git.sh b/src/ci/docker/dist-i686-linux/build-git.sh index 92fa66b496d93..ff62a68629a8b 100755 --- a/src/ci/docker/dist-i686-linux/build-git.sh +++ b/src/ci/docker/dist-i686-linux/build-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-headers.sh b/src/ci/docker/dist-i686-linux/build-headers.sh index 4ce38fd9205e2..2f15114d6f980 100755 --- a/src/ci/docker/dist-i686-linux/build-headers.sh +++ b/src/ci/docker/dist-i686-linux/build-headers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-openssl.sh b/src/ci/docker/dist-i686-linux/build-openssl.sh index 34da0ed631093..e7226ace020bd 100755 --- a/src/ci/docker/dist-i686-linux/build-openssl.sh +++ b/src/ci/docker/dist-i686-linux/build-openssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-i686-linux/build-python.sh b/src/ci/docker/dist-i686-linux/build-python.sh index a7a450f3c8de7..c6b8cdde4b9af 100755 --- a/src/ci/docker/dist-i686-linux/build-python.sh +++ b/src/ci/docker/dist-i686-linux/build-python.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh b/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh index 90a4df0c19583..15211acb4459b 100755 --- a/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh +++ b/src/ci/docker/dist-powerpc-linux/build-powerpc-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh index c477cd61f98de..ac6460a472993 100755 --- a/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh +++ b/src/ci/docker/dist-powerpc64-linux/build-powerpc64-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh index 5f556b67081a3..2f6937afff032 100755 --- a/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh +++ b/src/ci/docker/dist-powerpc64le-linux/build-powerpc64le-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh b/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh index b4995e20dc69b..306204dd0e1f6 100755 --- a/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh +++ b/src/ci/docker/dist-s390x-linux/build-s390x-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh b/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh index 8343327c33bf2..3c86a8e38175e 100755 --- a/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh +++ b/src/ci/docker/dist-x86_64-freebsd/build-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-binutils.sh b/src/ci/docker/dist-x86_64-linux/build-binutils.sh index 80aa1f2a01613..f4bdbd80d0edb 100755 --- a/src/ci/docker/dist-x86_64-linux/build-binutils.sh +++ b/src/ci/docker/dist-x86_64-linux/build-binutils.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-cmake.sh b/src/ci/docker/dist-x86_64-linux/build-cmake.sh index 82e46455cb0f0..9a3763d421ad2 100755 --- a/src/ci/docker/dist-x86_64-linux/build-cmake.sh +++ b/src/ci/docker/dist-x86_64-linux/build-cmake.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-curl.sh b/src/ci/docker/dist-x86_64-linux/build-curl.sh index b7d22755a571b..edf3175b81c43 100755 --- a/src/ci/docker/dist-x86_64-linux/build-curl.sh +++ b/src/ci/docker/dist-x86_64-linux/build-curl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-gcc.sh b/src/ci/docker/dist-x86_64-linux/build-gcc.sh index ab2562538d6d7..6b991bb59e4b0 100755 --- a/src/ci/docker/dist-x86_64-linux/build-gcc.sh +++ b/src/ci/docker/dist-x86_64-linux/build-gcc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-git.sh b/src/ci/docker/dist-x86_64-linux/build-git.sh index 92fa66b496d93..ff62a68629a8b 100755 --- a/src/ci/docker/dist-x86_64-linux/build-git.sh +++ b/src/ci/docker/dist-x86_64-linux/build-git.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-headers.sh b/src/ci/docker/dist-x86_64-linux/build-headers.sh index 4ce38fd9205e2..2f15114d6f980 100755 --- a/src/ci/docker/dist-x86_64-linux/build-headers.sh +++ b/src/ci/docker/dist-x86_64-linux/build-headers.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-openssl.sh b/src/ci/docker/dist-x86_64-linux/build-openssl.sh index 34da0ed631093..e7226ace020bd 100755 --- a/src/ci/docker/dist-x86_64-linux/build-openssl.sh +++ b/src/ci/docker/dist-x86_64-linux/build-openssl.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-linux/build-python.sh b/src/ci/docker/dist-x86_64-linux/build-python.sh index a7a450f3c8de7..c6b8cdde4b9af 100755 --- a/src/ci/docker/dist-x86_64-linux/build-python.sh +++ b/src/ci/docker/dist-x86_64-linux/build-python.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2017 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh index 54100b49cb9f5..9e1b769f6c405 100755 --- a/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh +++ b/src/ci/docker/dist-x86_64-netbsd/build-netbsd-toolchain.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. @@ -64,12 +64,12 @@ cd ../.. rm -rf usr cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc-sysroot <<'EOF' -#!/bin/bash +#!/usr/bin/env bash exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-gcc --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@" EOF cat > /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++-sysroot <<'EOF' -#!/bin/bash +#!/usr/bin/env bash exec /x-tools/x86_64-unknown-netbsd/bin/x86_64--netbsd-g++ --sysroot=/x-tools/x86_64-unknown-netbsd/sysroot "$@" EOF diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh index dc02310b4f21f..a863e1a2d5dc0 100755 --- a/src/ci/docker/run.sh +++ b/src/ci/docker/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/init_repo.sh b/src/ci/init_repo.sh index 7ffe00a807b34..e073a3d99c157 100755 --- a/src/ci/init_repo.sh +++ b/src/ci/init_repo.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/ci/run.sh b/src/ci/run.sh index deea4fec4dcfb..a8a7dd5bc27aa 100755 --- a/src/ci/run.sh +++ b/src/ci/run.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash # Copyright 2016 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. diff --git a/src/liballoc/str.rs b/src/liballoc/str.rs index a167b2e57c078..f68ee847eb3ab 100644 --- a/src/liballoc/str.rs +++ b/src/liballoc/str.rs @@ -2293,7 +2293,7 @@ impl str { /// /// - U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+003A ... U+0040 `: ; < = > ? @`, or - /// - U+005B ... U+0060 `[ \\ ] ^ _ \``, or + /// - U+005B ... U+0060 ``[ \ ] ^ _ ` ``, or /// - U+007B ... U+007E `{ | } ~` #[unstable(feature = "ascii_ctype", issue = "39658")] #[inline] diff --git a/src/libcore/num/mod.rs b/src/libcore/num/mod.rs index 7fe0aabeec9e9..1230066e2b33b 100644 --- a/src/libcore/num/mod.rs +++ b/src/libcore/num/mod.rs @@ -2630,7 +2630,7 @@ impl u8 { /// /// - U+0021 ... U+002F `! " # $ % & ' ( ) * + , - . /`, or /// - U+003A ... U+0040 `: ; < = > ? @`, or - /// - U+005B ... U+0060 `[ \\ ] ^ _ \``, or + /// - U+005B ... U+0060 ``[ \ ] ^ _ ` ``, or /// - U+007B ... U+007E `{ | } ~` /// /// # Examples diff --git a/src/libcore/str/mod.rs b/src/libcore/str/mod.rs index 670c2afa66f85..be5108238fc04 100644 --- a/src/libcore/str/mod.rs +++ b/src/libcore/str/mod.rs @@ -76,9 +76,12 @@ pub trait FromStr: Sized { /// Parses a string `s` to return a value of this type. /// - /// If parsing succeeds, return the value inside `Ok`, otherwise + /// If parsing succeeds, return the value inside [`Ok`], otherwise /// when the string is ill-formatted return an error specific to the - /// inside `Err`. The error type is specific to implementation of the trait. + /// inside [`Err`]. The error type is specific to implementation of the trait. + /// + /// [`Ok`]: ../../std/result/enum.Result.html#variant.Ok + /// [`Err`]: ../../std/result/enum.Result.html#variant.Err /// /// # Examples /// diff --git a/src/librustc_mir/borrow_check.rs b/src/librustc_mir/borrow_check.rs index deffb85bf8795..4f0fff5891809 100644 --- a/src/librustc_mir/borrow_check.rs +++ b/src/librustc_mir/borrow_check.rs @@ -93,9 +93,7 @@ fn do_mir_borrowck<'a, 'gcx, 'tcx>(infcx: &InferCtxt<'a, 'gcx, 'tcx>, tcx.cannot_move_out_of(span, "borrowed_content", origin), IllegalMoveOriginKind::InteriorOfTypeWithDestructor { container_ty: ty } => tcx.cannot_move_out_of_interior_of_drop(span, ty, origin), - IllegalMoveOriginKind::InteriorOfSlice { elem_ty: ty, is_index } => - tcx.cannot_move_out_of_interior_noncopy(span, ty, is_index, origin), - IllegalMoveOriginKind::InteriorOfArray { elem_ty: ty, is_index } => + IllegalMoveOriginKind::InteriorOfSliceOrArray { ty, is_index } => tcx.cannot_move_out_of_interior_noncopy(span, ty, is_index, origin), }; err.emit(); diff --git a/src/librustc_mir/dataflow/move_paths/builder.rs b/src/librustc_mir/dataflow/move_paths/builder.rs index 79ea745125c53..f333dd4d2a178 100644 --- a/src/librustc_mir/dataflow/move_paths/builder.rs +++ b/src/librustc_mir/dataflow/move_paths/builder.rs @@ -137,21 +137,21 @@ impl<'b, 'a, 'gcx, 'tcx> Gatherer<'b, 'a, 'gcx, 'tcx> { // move out of union - always move the entire union ty::TyAdt(adt, _) if adt.is_union() => return Err(MoveError::UnionMove { path: base }), - ty::TySlice(elem_ty) => + ty::TySlice(_) => return Err(MoveError::cannot_move_out_of( mir.source_info(self.loc).span, - InteriorOfSlice { - elem_ty, is_index: match proj.elem { + InteriorOfSliceOrArray { + ty: lv_ty, is_index: match proj.elem { ProjectionElem::Index(..) => true, _ => false }, })), - ty::TyArray(elem_ty, _num_elems) => match proj.elem { + ty::TyArray(..) => match proj.elem { ProjectionElem::Index(..) => return Err(MoveError::cannot_move_out_of( mir.source_info(self.loc).span, - InteriorOfArray { - elem_ty, is_index: true + InteriorOfSliceOrArray { + ty: lv_ty, is_index: true })), _ => { // FIXME: still badly broken diff --git a/src/librustc_mir/dataflow/move_paths/mod.rs b/src/librustc_mir/dataflow/move_paths/mod.rs index 5bfecd01aaa82..73218c9815024 100644 --- a/src/librustc_mir/dataflow/move_paths/mod.rs +++ b/src/librustc_mir/dataflow/move_paths/mod.rs @@ -239,8 +239,7 @@ pub(crate) enum IllegalMoveOriginKind<'tcx> { Static, BorrowedContent, InteriorOfTypeWithDestructor { container_ty: ty::Ty<'tcx> }, - InteriorOfSlice { elem_ty: ty::Ty<'tcx>, is_index: bool, }, - InteriorOfArray { elem_ty: ty::Ty<'tcx>, is_index: bool, }, + InteriorOfSliceOrArray { ty: ty::Ty<'tcx>, is_index: bool, }, } #[derive(Debug)] diff --git a/src/librustdoc/html/highlight.rs b/src/librustdoc/html/highlight.rs index 98863b229b511..6b0f209c0c454 100644 --- a/src/librustdoc/html/highlight.rs +++ b/src/librustdoc/html/highlight.rs @@ -42,7 +42,7 @@ pub fn render_with_highlighting(src: &str, class: Option<&str>, id: Option<&str> let mut out = Vec::new(); if let Some((tooltip, class)) = tooltip { - write!(out, "