Skip to content

Instantly share code, notes, and snippets.

@bczhc
Last active February 8, 2026 04:02
Show Gist options
  • Select an option

  • Save bczhc/359438bbe138f58488b205c76664eadd to your computer and use it in GitHub Desktop.

Select an option

Save bczhc/359438bbe138f58488b205c76664eadd to your computer and use it in GitHub Desktop.
Rust try_blocks now becomes homogenous. https://github.com/rust-lang/rust/issues/149025
~/code/untitled9 master ?14 ❯ cargo bisect-rustc --start 2025-11-14 --end 2025-11-15 11:11:41
checking the start range to find a passing nightly
installing nightly-2025-11-14
rust-std-nightly-x86_64-unknown-linux-gnu: 28.02 MB / 28.02 MB [===========================================================================================] 100.00 % 6.98 MB/s testing...
RESULT: nightly-2025-11-14, ===> Successfully compiled
uninstalling nightly-2025-11-14
checking the end range to verify it does not pass
installing nightly-2025-11-15
rust-std-nightly-x86_64-unknown-linux-gnu: 28.01 MB / 28.01 MB [===========================================================================================] 100.00 % 7.72 MB/s testing...
RESULT: nightly-2025-11-15, ===> Compile error
uninstalling nightly-2025-11-15
searched toolchains nightly-2025-11-14 through nightly-2025-11-15
checking last toolchain to determine final result
installing nightly-2025-11-15
rust-std-nightly-x86_64-unknown-linux-gnu: 28.01 MB / 28.01 MB [==========================================================================================] 100.00 % 13.39 MB/s testing...
uninstalling nightly-2025-11-15
********************************************************************************
Regression in nightly-2025-11-15
********************************************************************************
fetching https://static.rust-lang.org/dist/2025-11-14/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-11-14: 40 B / 40 B [=================================================================================================================] 100.00 % 1.30 MB/s converted 2025-11-14 to 2286e5d224b3413484cf4f398a9f078487e7b49d
fetching https://static.rust-lang.org/dist/2025-11-15/channel-rust-nightly-git-commit-hash.txt
nightly manifest 2025-11-15: 40 B / 40 B [===============================================================================================================] 100.00 % 897.97 KB/s converted 2025-11-15 to b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
looking for regression commit between 2025-11-14 and 2025-11-15
fetching (via remote github) commits from max(2286e5d224b3413484cf4f398a9f078487e7b49d, 2025-11-12) to b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
ending github query because we found starting sha: 2286e5d224b3413484cf4f398a9f078487e7b49d
get_commits_between returning commits, len: 8
commit[0] 2025-11-13: Auto merge of #148481 - GuillaumeGomez:subtree-update_cg_gcc_2025-11-04, r=GuillaumeGomez
commit[1] 2025-11-13: Auto merge of #148896 - Kobzol:revert-146627, r=madsmtm
commit[2] 2025-11-14: Auto merge of #147462 - Enselic:fix-basic-stepping-array, r=saethlin
commit[3] 2025-11-14: Auto merge of #148931 - Zalathar:rollup-yfyhpcw, r=Zalathar
commit[4] 2025-11-14: Auto merge of #148938 - Zalathar:rollup-xg51707, r=Zalathar
commit[5] 2025-11-14: Auto merge of #148940 - dtolnay:implarguments, r=joboet
commit[6] 2025-11-14: Auto merge of #138918 - Ayush1325:uefi-fs-time, r=joboet
commit[7] 2025-11-14: Auto merge of #148944 - theemathas:rm_inherit_overflow, r=joboet
validated commits found, specifying toolchains
checking the start range to verify it passes
installing 2286e5d224b3413484cf4f398a9f078487e7b49d
rust-std-nightly-x86_64-unknown-linux-gnu: 31.72 MB / 31.72 MB [==========================================================================================] 100.00 % 11.02 MB/s testing...
RESULT: 2286e5d224b3413484cf4f398a9f078487e7b49d, ===> Successfully compiled
uninstalling 2286e5d224b3413484cf4f398a9f078487e7b49d
checking the end range to verify it does not pass
installing b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
rust-std-nightly-x86_64-unknown-linux-gnu: 31.75 MB / 31.75 MB [==========================================================================================] 100.00 % 12.43 MB/s testing...
RESULT: b6d7ff3aa71e48e2901b0900f8b5d98126b537ed, ===> Compile error
uninstalling b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
4 versions remaining to test after this (roughly 3 steps)
installing c880acdd3171dfafdb55be8cd9822a857e99348d
rust-std-nightly-x86_64-unknown-linux-gnu: 31.76 MB / 31.76 MB [==========================================================================================] 100.00 % 10.93 MB/s testing...
RESULT: c880acdd3171dfafdb55be8cd9822a857e99348d, ===> Successfully compiled
uninstalling c880acdd3171dfafdb55be8cd9822a857e99348d
2 versions remaining to test after this (roughly 2 steps)
installing c91009892b4cd1776d4c9d85793166612195a03d
rust-std-nightly-x86_64-unknown-linux-gnu: 31.78 MB / 31.78 MB [==========================================================================================] 100.00 % 12.02 MB/s testing...
RESULT: c91009892b4cd1776d4c9d85793166612195a03d, ===> Compile error
uninstalling c91009892b4cd1776d4c9d85793166612195a03d
1 versions remaining to test after this (roughly 1 steps)
installing c8551d3c63c51f290cf1dc9dc4714249ea849fd1
rust-std-nightly-x86_64-unknown-linux-gnu: 31.79 MB / 31.79 MB [==========================================================================================] 100.00 % 11.76 MB/s testing...
RESULT: c8551d3c63c51f290cf1dc9dc4714249ea849fd1, ===> Compile error
uninstalling c8551d3c63c51f290cf1dc9dc4714249ea849fd1
searched toolchains 2286e5d224b3413484cf4f398a9f078487e7b49d through b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
********************************************************************************
Regression in c8551d3c63c51f290cf1dc9dc4714249ea849fd1
********************************************************************************
Attempting to search unrolled perf builds
Found commits ["3767dd8f", "112edf6a", "3604d6b1", "baac2b9f"]
installing 3767dd8f30867957b63290826dc2f04e8c325dc1
rust-std-nightly-x86_64-unknown-linux-gnu: 31.75 MB / 31.75 MB [==========================================================================================] 100.00 % 12.72 MB/s testing...
RESULT: 3767dd8f30867957b63290826dc2f04e8c325dc1, ===> Successfully compiled
uninstalling 3767dd8f30867957b63290826dc2f04e8c325dc1
installing 112edf6ac68505c7515722be71db57de6cbd473d
rust-std-nightly-x86_64-unknown-linux-gnu: 31.76 MB / 31.76 MB [==========================================================================================] 100.00 % 12.62 MB/s testing...
RESULT: 112edf6ac68505c7515722be71db57de6cbd473d, ===> Compile error
uninstalling 112edf6ac68505c7515722be71db57de6cbd473d
Regression in https://github.com/rust-lang/rust/commit/112edf6ac68505c7515722be71db57de6cbd473d. Note that if it is a legacy rollup build, it might be available in https://github.com/rust-lang-ci/rust/commit/112edf6ac68505c7515722be71db57de6cbd473d.
The PR introducing the regression in this rollup is #148725: Implement the alternative `try` block desugaring
==================================================================================
= Please file this regression report on the rust-lang/rust GitHub repository =
= New issue: https://github.com/rust-lang/rust/issues/new =
= Known issues: https://github.com/rust-lang/rust/issues =
= Copy and paste the text below into the issue report thread. Thanks! =
==================================================================================
searched nightlies: from nightly-2025-11-14 to nightly-2025-11-15
regressed nightly: nightly-2025-11-15
searched commit range: https://github.com/rust-lang/rust/compare/2286e5d224b3413484cf4f398a9f078487e7b49d...b6d7ff3aa71e48e2901b0900f8b5d98126b537ed
regressed commit: https://github.com/rust-lang/rust/commit/c8551d3c63c51f290cf1dc9dc4714249ea849fd1
<details>
<summary>bisected with <a href='https://github.com/rust-lang/cargo-bisect-rustc'>cargo-bisect-rustc</a> v0.6.11</summary>
Host triple: x86_64-unknown-linux-gnu
Reproduce with:
```bash
cargo bisect-rustc --start 2025-11-14 --end 2025-11-15
```
</details>
#![feature(try_blocks)]
use std::fmt::{Display, Formatter};
use std::io;
#[derive(Debug)]
enum Error {
#[allow(unused)]
Io(io::Error)
}
impl Display for Error {
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
f.write_str("Io(...)")
}
}
impl std::error::Error for Error {}
type Result<T> = std::result::Result<T, Error>;
impl From<io::Error> for Error {
fn from(value: io::Error) -> Self {
Self::Io(value)
}
}
fn main() {
let result: Result<()> = try {
let r: io::Result<()> = Ok(());
r?;
};
fn foo() -> Result<()> {
let r: io::Result<()> = Ok(());
r?;
Ok(())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment