Skip to content

Commit a741008

Browse files
committed
Auto merge of #151270 - Mark-Simulacrum:beta-backport, r=Mark-Simulacrum
[beta] backports * [beta] Disable SimplifyComparisonIntegral #151267 * Use the old homu bors e-mail address again #150959 Does not backport other nominated PRs: * Only use SSA locals in SimplifyComparisonIntegral #150925 (replaced with the disablement PR) * Don't try to evaluate const blocks during constant promotion #150557 (backport essentially denied at this point) * Use realstd current thread static variables in tests #150131 (as far as I can tell, this only affects internal std tests and hasn't landed in time for backport) r? @Mark-Simulacrum
2 parents 9a4aba1 + 6feceec commit a741008

File tree

28 files changed

+493
-674
lines changed

28 files changed

+493
-674
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ jobs:
289289
fi
290290
291291
# Get closest bors merge commit
292-
PARENT_COMMIT=`git rev-list --author='bors <bors@rust-lang.org>' -n1 --first-parent HEAD^1`
292+
PARENT_COMMIT=`git rev-list --author='bors@rust-lang.org' --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
293293
294294
./build/citool/debug/citool postprocess-metrics \
295295
--job-name ${CI_JOB_NAME} \

.github/workflows/post-merge.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
sleep 60
3030
3131
# Get closest bors merge commit
32-
PARENT_COMMIT=`git rev-list --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
32+
PARENT_COMMIT=`git rev-list --author='bors@rust-lang.org' --author='122020455+rust-bors\[bot\]@users.noreply.github.com' -n1 --first-parent HEAD^1`
3333
echo "Parent: ${PARENT_COMMIT}"
3434
3535
# Find PR for the current commit

compiler/rustc_mir_transform/src/simplify_comparison_integral.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pub(super) struct SimplifyComparisonIntegral;
2727

2828
impl<'tcx> crate::MirPass<'tcx> for SimplifyComparisonIntegral {
2929
fn is_enabled(&self, sess: &rustc_session::Session) -> bool {
30-
sess.mir_opt_level() > 0
30+
sess.mir_opt_level() > 0 && sess.opts.unstable_opts.unsound_mir_opts
3131
}
3232

3333
fn run_pass(&self, tcx: TyCtxt<'tcx>, body: &mut Body<'tcx>) {

src/build_helper/src/git.rs

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,10 @@ pub fn has_changed_since(git_dir: &Path, base: &str, paths: &[&str]) -> bool {
152152
})
153153
}
154154

155-
const LEGACY_BORS_EMAIL: &str = "bors@rust-lang.org";
155+
// Temporary e-mail used by new bors for merge commits for a few days, until it learned how to reuse
156+
// the original homu e-mail
157+
// FIXME: remove in Q2 2026
158+
const TEMPORARY_BORS_EMAIL: &str = "122020455+rust-bors[bot]@users.noreply.github.com";
156159

157160
/// Escape characters from the git user e-mail, so that git commands do not interpret it as regex
158161
/// special characters.
@@ -193,10 +196,9 @@ fn get_latest_upstream_commit_that_modified_files(
193196
&escape_email_git_regex(git_config.git_merge_commit_email),
194197
]);
195198

196-
// Also search for legacy bors account, before we accrue enough commits to
197-
// have changes to all relevant file paths done by new bors.
198-
if git_config.git_merge_commit_email != LEGACY_BORS_EMAIL {
199-
git.args(["--author", LEGACY_BORS_EMAIL]);
199+
// Also search for temporary bors account
200+
if git_config.git_merge_commit_email != TEMPORARY_BORS_EMAIL {
201+
git.args(["--author", &escape_email_git_regex(TEMPORARY_BORS_EMAIL)]);
200202
}
201203

202204
if !target_paths.is_empty() {
@@ -248,10 +250,9 @@ pub fn get_closest_upstream_commit(
248250
base,
249251
]);
250252

251-
// Also search for legacy bors account, before we accrue enough commits to
252-
// have changes to all relevant file paths done by new bors.
253-
if config.git_merge_commit_email != LEGACY_BORS_EMAIL {
254-
git.args(["--author", LEGACY_BORS_EMAIL]);
253+
// Also search for temporary bors account
254+
if config.git_merge_commit_email != TEMPORARY_BORS_EMAIL {
255+
git.args(["--author", &escape_email_git_regex(TEMPORARY_BORS_EMAIL)]);
255256
}
256257

257258
let output = output_result(&mut git)?.trim().to_owned();

src/ci/github-actions/jobs.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ try:
152152
- <<: *job-dist-x86_64-linux
153153

154154
# Jobs that only run when explicitly invoked in one of the following ways:
155-
# - comment `@bors2 try jobs=<job-name>`
156-
# - `try-job: <job-name>` in the PR description and comment `@bors try` or `@bors2 try`.
155+
# - comment `@bors try jobs=<job-name>`
156+
# - `try-job: <job-name>` in the PR description and comment `@bors try`.
157157
optional:
158158
# This job is used just to test optional jobs.
159159
# It will be replaced by tier 2 and tier 3 jobs in the future.

src/stage0

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
dist_server=https://static.rust-lang.org
22
artifacts_server=https://ci-artifacts.rust-lang.org/rustc-builds
33
artifacts_with_llvm_assertions_server=https://ci-artifacts.rust-lang.org/rustc-builds-alt
4-
git_merge_commit_email=122020455+rust-bors[bot]@users.noreply.github.com
4+
git_merge_commit_email=bors@rust-lang.org
55
nightly_branch=main
66

77
# The configuration above this comment is editable, and can be changed

tests/codegen-llvm/hint/likely.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn test4(x: u64) {
7070
}
7171

7272
// CHECK-LABEL: @test4(
73-
// CHECK: br i1 %0, label %bb3, label %bb2, !prof ![[NUM2:[0-9]+]]
73+
// CHECK: br i1 %_2.not, label %bb3, label %bb2, !prof ![[NUM2:[0-9]+]]
7474
// CHECK: bb3:
7575
// CHECK: path_a
7676
// CHECK: bb2:

tests/codegen-llvm/hint/unlikely.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn test4(x: u64) {
7070
}
7171

7272
// CHECK-LABEL: @test4(
73-
// CHECK: br i1 %0, label %bb4, label %bb2, !prof ![[NUM2:[0-9]+]]
73+
// CHECK: br i1 %_2.not, label %bb4, label %bb2, !prof ![[NUM2:[0-9]+]]
7474
// CHECK: bb4:
7575
// CHECK: path_a
7676
// CHECK: bb2:

tests/debuginfo/dummy_span.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ min-lldb-version: 310
22

3-
//@ compile-flags:-g
3+
//@ compile-flags:-g -Zunsound-mir-opts
44
//@ ignore-backends: gcc
55

66
// === GDB TESTS ===================================================================================

tests/mir-opt/funky_arms.float_to_exponential_common.GVN.32bit.panic-abort.diff

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@
2929
debug precision => _8;
3030
let _8: usize;
3131
scope 5 (inlined Formatter::<'_>::precision) {
32-
let mut _22: u32;
32+
let mut _22: bool;
3333
let mut _23: u32;
34-
let mut _24: usize;
35-
let mut _25: u16;
34+
let mut _24: u32;
35+
let mut _25: usize;
36+
let mut _26: u16;
3637
}
3738
}
3839
}
@@ -71,10 +72,12 @@
7172
StorageLive(_6);
7273
StorageLive(_22);
7374
StorageLive(_23);
74-
_23 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
75-
_22 = BitAnd(move _23, const core::fmt::flags::PRECISION_FLAG);
76-
StorageDead(_23);
77-
switchInt(move _22) -> [0: bb10, otherwise: bb11];
75+
StorageLive(_24);
76+
_24 = copy (((*_1).0: std::fmt::FormattingOptions).0: u32);
77+
_23 = BitAnd(move _24, const core::fmt::flags::PRECISION_FLAG);
78+
StorageDead(_24);
79+
_22 = Eq(move _23, const 0_u32);
80+
switchInt(move _22) -> [0: bb10, otherwise: bb9];
7881
}
7982

8083
bb4: {
@@ -142,26 +145,27 @@
142145
}
143146

144147
bb9: {
145-
_7 = discriminant(_6);
146-
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
148+
StorageDead(_23);
149+
_6 = const Option::<usize>::None;
150+
goto -> bb11;
147151
}
148152

149153
bb10: {
150-
StorageDead(_22);
151-
_6 = const Option::<usize>::None;
152-
goto -> bb9;
154+
StorageDead(_23);
155+
StorageLive(_25);
156+
StorageLive(_26);
157+
_26 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
158+
_25 = move _26 as usize (IntToInt);
159+
StorageDead(_26);
160+
_6 = Option::<usize>::Some(move _25);
161+
StorageDead(_25);
162+
goto -> bb11;
153163
}
154164

155165
bb11: {
156166
StorageDead(_22);
157-
StorageLive(_24);
158-
StorageLive(_25);
159-
_25 = copy (((*_1).0: std::fmt::FormattingOptions).2: u16);
160-
_24 = move _25 as usize (IntToInt);
161-
StorageDead(_25);
162-
_6 = Option::<usize>::Some(move _24);
163-
StorageDead(_24);
164-
goto -> bb9;
167+
_7 = discriminant(_6);
168+
switchInt(move _7) -> [1: bb4, 0: bb6, otherwise: bb12];
165169
}
166170

167171
bb12: {

0 commit comments

Comments
 (0)