Skip to content

Rollup of 9 pull requests #143810

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

Merged
merged 34 commits into from
Jul 12, 2025
Merged
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
b2299e2
fix: correct assertion to check for 'noinline' attribute presence bef…
dillona Jul 8, 2025
62f58db
Port `#[const_trait]` to the new attribute system
GrigorenkoPV Jun 23, 2025
938916d
Port `#[rustc_deny_explicit_impl]` to the new attribute system
GrigorenkoPV Jun 23, 2025
adb325f
Port `#[rustc_do_not_implement_via_object]` to the new attribute system
GrigorenkoPV Jun 23, 2025
6f8e92d
Port `#[rustc_coinductive]` to the new attribute system
GrigorenkoPV Jun 23, 2025
813ec60
Port `#[type_const]` to the new attribute system
GrigorenkoPV Jun 23, 2025
6193783
Port `#[rustc_specialization_trait]` to the new attribute system
GrigorenkoPV Jun 23, 2025
a57a885
Port `#[rustc_unsafe_specialization_marker]` to the new attribute system
GrigorenkoPV Jun 23, 2025
12f6487
Port `#[marker]` to the new attribute system
GrigorenkoPV Jun 23, 2025
507ebce
Port `#[fundamental]` to the new attribute system
GrigorenkoPV Jun 23, 2025
1bdf703
Port `#[rustc_paren_sugar]` to the new attribute system
GrigorenkoPV Jun 23, 2025
a6bc816
Reorder attribute parsers in `traits.rs`
GrigorenkoPV Jun 24, 2025
e9e6495
Port `#[rustc_allow_incoherent_impl]` to the new attribute system
GrigorenkoPV Jun 24, 2025
e584ed0
Port `#[rustc_coherence_is_core]` to the new attribute system
GrigorenkoPV Jun 24, 2025
04bb68a
compiler: recomment `needs_fn_once_adapter_shim`
workingjubilee Jul 10, 2025
a866377
Add target maintainer information for aarch64-unknown-linux-musl
Gelbpunkt Jul 10, 2025
ed96f00
fix typos in function names in the `target_feature` test
fluiderson Jul 10, 2025
3c11029
docs: clarify “dag” in std::sys_common doc comment
ColtenOuO Jul 8, 2025
2861274
x: clippy fixes
hkBst Jul 11, 2025
b87a1b1
x: move to edition 2024
hkBst Jul 11, 2025
dcf965d
x: use let-else
hkBst Jul 11, 2025
011d4aa
Call `get_switch_int_data` on a block with SwitchInt terminator
tmiasko Jul 11, 2025
ba3b7a7
build-helper: clippy fixes
hkBst Jul 11, 2025
39f7707
compiler: comment on some call-related codegen fn in cg_ssa
workingjubilee Jul 10, 2025
5b6d661
Remove support for SwitchInt edge effects in backward dataflow analyses
tmiasko Jul 11, 2025
c8780ff
Rollup merge of #143403 - GrigorenkoPV:attributes/traits, r=jdonszelmann
matthiaskrgr Jul 11, 2025
7f3204f
Rollup merge of #143633 - dillona:noinline-assert, r=fee1-dead
matthiaskrgr Jul 11, 2025
140fc18
Rollup merge of #143647 - ColtenOuO:master, r=ChrisDenton
matthiaskrgr Jul 11, 2025
b18064f
Rollup merge of #143716 - workingjubilee:document-some-codegen-backen…
matthiaskrgr Jul 11, 2025
287e6e7
Rollup merge of #143747 - Gelbpunkt:aarch64-musl-maintainer, r=jieyouxu
matthiaskrgr Jul 11, 2025
93caee6
Rollup merge of #143759 - fluiderson:rdttff, r=aDotInTheVoid
matthiaskrgr Jul 11, 2025
8c5f3e4
Rollup merge of #143767 - hkBst:cleanup-x, r=jieyouxu
matthiaskrgr Jul 11, 2025
1d2aa4d
Rollup merge of #143769 - tmiasko:rm-backward-switch-int, r=lqd
matthiaskrgr Jul 11, 2025
324bc31
Rollup merge of #143770 - hkBst:build-helper-cleanup, r=Kobzol
matthiaskrgr Jul 11, 2025
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
Prev Previous commit
Next Next commit
x: use let-else
  • Loading branch information
hkBst committed Jul 11, 2025
commit dcf965d65271c76b3cb73e53b91147905f811f34
9 changes: 4 additions & 5 deletions src/tools/x/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ const PYTHON2: &str = "python2";
const PYTHON3: &str = "python3";

fn python() -> &'static str {
let val = match env::var_os("PATH") {
Some(val) => val,
None => return PYTHON,
let Some(path) = env::var_os("PATH") else {
return PYTHON;
};

let mut python2 = false;
let mut python3 = false;

for dir in env::split_paths(&val) {
for dir in env::split_paths(&path) {
// `python` should always take precedence over python2 / python3 if it exists
if dir.join(PYTHON).with_extension(EXE_EXTENSION).exists() {
return PYTHON;
Expand Down Expand Up @@ -103,14 +102,14 @@ fn main() {
println!("{version}");
return;
}

let current = match env::current_dir() {
Ok(dir) => dir,
Err(err) => {
eprintln!("Failed to get current directory: {err}");
process::exit(1);
}
};

for dir in current.ancestors() {
let candidate = dir.join("x.py");
if candidate.exists() {
Expand Down
Loading