Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[beta] Backports #93306

Merged
merged 4 commits into from
Jan 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ jobs:
- name: ensure backported commits are in upstream branches
run: src/ci/scripts/verify-backported-commits.sh
if: success() && !env.SKIP_JOB
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh
if: success() && !env.SKIP_JOB
- name: run the build
run: src/ci/scripts/run-build-from-ci.sh
env:
Expand Down Expand Up @@ -502,6 +505,9 @@ jobs:
- name: ensure backported commits are in upstream branches
run: src/ci/scripts/verify-backported-commits.sh
if: success() && !env.SKIP_JOB
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh
if: success() && !env.SKIP_JOB
- name: run the build
run: src/ci/scripts/run-build-from-ci.sh
env:
Expand Down Expand Up @@ -612,6 +618,9 @@ jobs:
- name: ensure backported commits are in upstream branches
run: src/ci/scripts/verify-backported-commits.sh
if: success() && !env.SKIP_JOB
- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh
if: success() && !env.SKIP_JOB
- name: run the build
run: src/ci/scripts/run-build-from-ci.sh
env:
Expand Down
25 changes: 7 additions & 18 deletions Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ dependencies = [
"clippy_utils",
"if_chain",
"itertools 0.10.1",
"pulldown-cmark 0.9.0",
"pulldown-cmark",
"quine-mc_cluskey",
"regex-syntax",
"rustc-semver",
Expand Down Expand Up @@ -2154,9 +2154,9 @@ dependencies = [

[[package]]
name = "mdbook"
version = "0.4.14"
version = "0.4.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f6e77253c46a90eb7e96b2807201dab941a4db5ea05eca5aaaf7027395f352b3"
checksum = "241f10687eb3b4e0634b3b4e423f97c5f1efbd69dc9522e24a8b94583eeec3c6"
dependencies = [
"ammonia",
"anyhow",
Expand All @@ -2169,7 +2169,7 @@ dependencies = [
"log",
"memchr",
"opener",
"pulldown-cmark 0.8.0",
"pulldown-cmark",
"regex",
"serde",
"serde_derive",
Expand Down Expand Up @@ -2808,27 +2808,16 @@ dependencies = [

[[package]]
name = "pulldown-cmark"
version = "0.8.0"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffade02495f22453cd593159ea2f59827aae7f53fa8323f756799b670881dcf8"
checksum = "34f197a544b0c9ab3ae46c359a7ec9cbbb5c7bf97054266fecb7ead794a181d6"
dependencies = [
"bitflags",
"getopts",
"memchr",
"unicase",
]

[[package]]
name = "pulldown-cmark"
version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "acd16514d1af5f7a71f909a44ef253cdb712a376d7ebc8ae4a471a9be9743548"
dependencies = [
"bitflags",
"memchr",
"unicase",
]

[[package]]
name = "punycode"
version = "0.4.1"
Expand Down Expand Up @@ -4634,7 +4623,7 @@ dependencies = [
"expect-test",
"itertools 0.9.0",
"minifier",
"pulldown-cmark 0.9.0",
"pulldown-cmark",
"rayon",
"regex",
"rustdoc-json-types",
Expand Down
18 changes: 2 additions & 16 deletions compiler/rustc_data_structures/src/sip128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -409,20 +409,6 @@ impl SipHasher128 {
}
}

macro_rules! dispatch_value {
($target: expr, $value:expr) => {
let value = $value;
#[allow(unreachable_patterns)]
#[allow(overflowing_literals)]
match value {
0..=0xFF => $target.short_write(value as u8),
0x100..=0xFFFF => $target.short_write(value as u16),
0x10000..=0xFFFFFFFF => $target.short_write(value as u32),
_ => $target.short_write(value as u64),
}
};
}

impl Hasher for SipHasher128 {
#[inline]
fn write_u8(&mut self, i: u8) {
Expand All @@ -436,7 +422,7 @@ impl Hasher for SipHasher128 {

#[inline]
fn write_u32(&mut self, i: u32) {
dispatch_value!(self, i);
self.short_write(i);
}

#[inline]
Expand Down Expand Up @@ -466,7 +452,7 @@ impl Hasher for SipHasher128 {

#[inline]
fn write_i64(&mut self, i: i64) {
dispatch_value!(self, i as u64);
self.short_write(i as u64);
}

#[inline]
Expand Down
4 changes: 4 additions & 0 deletions src/ci/github-actions/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ x--expand-yaml-anchors--remove:
run: src/ci/scripts/verify-backported-commits.sh
<<: *step

- name: ensure the stable version number is correct
run: src/ci/scripts/verify-stable-version-number.sh
<<: *step

- name: run the build
run: src/ci/scripts/run-build-from-ci.sh
env:
Expand Down
30 changes: 30 additions & 0 deletions src/ci/scripts/verify-stable-version-number.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash
# On the stable channel, check whether we're trying to build artifacts with the
# same version number of a release that's already been published, and fail the
# build if that's the case.
#
# It's a mistake whenever that happens: the release process won't start if it
# detects a duplicate version number, and the artifacts would have to be
# rebuilt anyway.

set -euo pipefail
IFS=$'\n\t'

if [[ "$(cat src/ci/channel)" != "stable" ]]; then
echo "This script only works on the stable channel. Skipping the check."
exit 0
fi

version="$(cat src/version)"
url="https://static.rust-lang.org/dist/channel-rust-${version}.toml"

if curl --silent --fail "${url}" >/dev/null; then
echo "The version number ${version} matches an existing release."
echo
echo "If you're trying to prepare a point release, remember to change the"
echo "version number in the src/version file."
exit 1
else
echo "The version number ${version} does not match any released version!"
exit 0
fi
4 changes: 2 additions & 2 deletions src/test/debuginfo/function-names.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
// Const generic parameter
// gdb-command:info functions -q function_names::const_generic_fn.*
// gdb-check:[...]static fn function_names::const_generic_fn_bool<false>();
// gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#3fcd7c34c1555be6}>();
// gdb-check:[...]static fn function_names::const_generic_fn_non_int<{CONST#fe3cfa0214ac55c7}>();
// gdb-check:[...]static fn function_names::const_generic_fn_signed_int<-7>();
// gdb-check:[...]static fn function_names::const_generic_fn_unsigned_int<14>();

Expand Down Expand Up @@ -76,7 +76,7 @@
// Const generic parameter
// cdb-command:x a!function_names::const_generic_fn*
// cdb-check:[...] a!function_names::const_generic_fn_bool<false> (void)
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST$3fcd7c34c1555be6> (void)
// cdb-check:[...] a!function_names::const_generic_fn_non_int<CONST$fe3cfa0214ac55c7> (void)
// cdb-check:[...] a!function_names::const_generic_fn_unsigned_int<14> (void)
// cdb-check:[...] a!function_names::const_generic_fn_signed_int<-7> (void)

Expand Down