-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
internal: Workaround salsa cycles leaking #18760
Conversation
e3ee0df
to
ed8227c
Compare
}; | ||
} else if let Some(cycle) = panic.downcast_ref::<Cycle>() { | ||
tracing::error!("Cycle propagated out of salsa! This is a bug: {cycle:?}"); | ||
return Err(Cancelled::PropagatedPanic); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm rebasing my fork against this PR now, and I'm debating whether this the removal of #[non_exhaustive]
in Salsa is necessary—could we return a different error here or is salsa::Cancelled
load-bearing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point the value of cancelled doesn't really matter anymore I think so we could also return some other unit error type here (the caller merely wants to know whether cancellation occured)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done: #18762
1255: Automated pull from upstream `beta` r=japaric a=ferrocene-automations[bot] :warning: **The automation reported these warnings:** :warning: * There are merge conflicts in this PR. Merge conflict markers have been committed. * Couldn't regenerate the `x.py` completions. Please run `./x run generate-completions` after fixing the merge conflicts. This PR pulls the following changes from the upstream repository: * `136017`: [[beta] backports](https://www.github.com/rust-lang/rust/issues/136017) * `135575`: [Backport rust-lang/rust-analyzer#18760](https://www.github.com/rust-lang/rust/issues/135575) * `135609`: [[beta] backports](https://www.github.com/rust-lang/rust/issues/135609) * `135508`: [[beta] TRPL: incorporate all backward-compatible Edition changes](https://www.github.com/rust-lang/rust/issues/135508) * `135351`: [[beta] stage0 bump and backports](https://www.github.com/rust-lang/rust/issues/135351) * `135163`: [Prepare 1.85 beta release](https://www.github.com/rust-lang/rust/issues/135163) * `135059`: [Rollup of 4 pull requests](https://www.github.com/rust-lang/rust/issues/135059) * `135049`: [Remove unused fields from RepeatElementCopy obligation](https://www.github.com/rust-lang/rust/issues/135049) * `135042`: [taint fcx on selection errors during unsizing](https://www.github.com/rust-lang/rust/issues/135042) * `134241`: [more concrete source url of std docs [V2]](https://www.github.com/rust-lang/rust/issues/134241) * `131729`: [Make the `test` cfg a userspace check-cfg](https://www.github.com/rust-lang/rust/issues/131729) * `134692`: [Move some things to `std::sync::poison` and reexport them in `std::sync`](https://www.github.com/rust-lang/rust/issues/134692) * `135053`: [Bump backtrace to rust-lang/backtrace-rs@4d7906b](https://www.github.com/rust-lang/rust/issues/135053) * `122565`: [Try to write the panic message with a single `write_all` call](https://www.github.com/rust-lang/rust/issues/122565) * `135040`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/135040) * `135035`: [Fix formatting command](https://www.github.com/rust-lang/rust/issues/135035) * `135033`: [try to dedup me in the mailmap](https://www.github.com/rust-lang/rust/issues/135033) * `135029`: [Update mailmap](https://www.github.com/rust-lang/rust/issues/135029) * `135027`: [Remove range-metadata amdgpu workaround](https://www.github.com/rust-lang/rust/issues/135027) * `135016`: [Ping me for rustc-dev-guide subtree changes on this repo](https://www.github.com/rust-lang/rust/issues/135016) * `135014`: [bootstrap: Overhaul and simplify the `tool_extended!` macro](https://www.github.com/rust-lang/rust/issues/135014) * `135023`: [bootstrap: flip `compile::Rustc` vs `compile::Assemble`](https://www.github.com/rust-lang/rust/issues/135023) * `135009`: [Fix doc for missing Box allocator consistency](https://www.github.com/rust-lang/rust/issues/135009) * `134907`: [Turn rustc-dev-guide into a Josh subtree](https://www.github.com/rust-lang/rust/issues/134907) * `130060`: [Autodiff Upstreaming - rustc_codegen_llvm changes](https://www.github.com/rust-lang/rust/issues/130060) * `135005`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/135005) * `135000`: [Fix ICE when opaque captures a duplicated/invalid lifetime](https://www.github.com/rust-lang/rust/issues/135000) * `134985`: [Remove qualification of `std::cmp::Ordering` in `Ord` doc](https://www.github.com/rust-lang/rust/issues/134985) * `134984`: [`ObligationCause` construction tweaks in typeck](https://www.github.com/rust-lang/rust/issues/134984) * `134973`: [Fix typos](https://www.github.com/rust-lang/rust/issues/134973) * `134967`: [handle submodules automatically on `doc` steps](https://www.github.com/rust-lang/rust/issues/134967) * `134080`: [Avoid use of LFS64 symbols on Emscripten](https://www.github.com/rust-lang/rust/issues/134080) * `134964`: [Run Python formatting check in tidy on CI](https://www.github.com/rust-lang/rust/issues/134964) * `134969`: [char to_digit: avoid unnecessary casts to u64](https://www.github.com/rust-lang/rust/issues/134969) * `134992`: [Rollup of 6 pull requests](https://www.github.com/rust-lang/rust/issues/134992) * `134979`: [Provide structured suggestion for `impl Default` of type where all fields have defaults](https://www.github.com/rust-lang/rust/issues/134979) * `134950`: [bootstrap: Overhaul and simplify the `tool_check_step!` macro](https://www.github.com/rust-lang/rust/issues/134950) * `134945`: [Some small nits to the borrowck suggestions for mutating a map through index](https://www.github.com/rust-lang/rust/issues/134945) * `134877`: [add suggestion for wrongly ordered format parameters](https://www.github.com/rust-lang/rust/issues/134877) * `133292`: [E0277: suggest dereferencing function arguments in more cases](https://www.github.com/rust-lang/rust/issues/133292) * `131439`: [Remove allowing static_mut_refs lint](https://www.github.com/rust-lang/rust/issues/131439) * `134926`: [Update books](https://www.github.com/rust-lang/rust/issues/134926) * `134988`: [Rollup of 8 pull requests](https://www.github.com/rust-lang/rust/issues/134988) * `134975`: [Revert style guide rhs break](https://www.github.com/rust-lang/rust/issues/134975) * `134974`: [Revert #119515 single line where clause style guide](https://www.github.com/rust-lang/rust/issues/134974) * `134972`: [add .mailmap entry for myself](https://www.github.com/rust-lang/rust/issues/134972) * `134971`: [chore: fix typos](https://www.github.com/rust-lang/rust/issues/134971) * `134968`: [Print how to rebless Python formatting in tidy](https://www.github.com/rust-lang/rust/issues/134968) * `134861`: [Add GUI test for item info elements color](https://www.github.com/rust-lang/rust/issues/134861) * `133486`: [borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`](https://www.github.com/rust-lang/rust/issues/133486) * `132474`: [Add more mailmap entries](https://www.github.com/rust-lang/rust/issues/132474) * `134987`: [Update cargo](https://www.github.com/rust-lang/rust/issues/134987) Co-authored-by: Tbkhi <me.stole546@silomails.com> Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com> Co-authored-by: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Co-authored-by: Christopher Speir <chris@cbspeir.dev> Co-authored-by: Kajetan Puchalski <kajetan.puchalski@tuta.io> Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Co-authored-by: Onur Özkan <work@onurozkan.dev> Co-authored-by: Yoh Deadfall <yoh.deadfall@hotmail.com> Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> Co-authored-by: Kajetan Puchalski <kajetan.puchalski@kajetanp.co.uk> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Michael Howell <michael@notriddle.com> Co-authored-by: Stuart Cook <Zalathar@users.noreply.github.com> Co-authored-by: Tbkhi <dining-03town@icloud.com> Co-authored-by: mu001999 <mu001999@outlook.com> Co-authored-by: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Thomas Nyman <thomasnyman@users.noreply.github.com> Co-authored-by: David Wood <david.wood2@arm.com>
1255: Automated pull from upstream `beta` r=pietroalbini a=ferrocene-automations[bot] :warning: **The automation reported these warnings:** :warning: * There are merge conflicts in this PR. Merge conflict markers have been committed. * Couldn't regenerate the `x.py` completions. Please run `./x run generate-completions` after fixing the merge conflicts. This PR pulls the following changes from the upstream repository: * `136017`: [[beta] backports](https://www.github.com/rust-lang/rust/issues/136017) * `135575`: [Backport rust-lang/rust-analyzer#18760](https://www.github.com/rust-lang/rust/issues/135575) * `135609`: [[beta] backports](https://www.github.com/rust-lang/rust/issues/135609) * `135508`: [[beta] TRPL: incorporate all backward-compatible Edition changes](https://www.github.com/rust-lang/rust/issues/135508) * `135351`: [[beta] stage0 bump and backports](https://www.github.com/rust-lang/rust/issues/135351) * `135163`: [Prepare 1.85 beta release](https://www.github.com/rust-lang/rust/issues/135163) * `135059`: [Rollup of 4 pull requests](https://www.github.com/rust-lang/rust/issues/135059) * `135049`: [Remove unused fields from RepeatElementCopy obligation](https://www.github.com/rust-lang/rust/issues/135049) * `135042`: [taint fcx on selection errors during unsizing](https://www.github.com/rust-lang/rust/issues/135042) * `134241`: [more concrete source url of std docs [V2]](https://www.github.com/rust-lang/rust/issues/134241) * `131729`: [Make the `test` cfg a userspace check-cfg](https://www.github.com/rust-lang/rust/issues/131729) * `134692`: [Move some things to `std::sync::poison` and reexport them in `std::sync`](https://www.github.com/rust-lang/rust/issues/134692) * `135053`: [Bump backtrace to rust-lang/backtrace-rs@4d7906b](https://www.github.com/rust-lang/rust/issues/135053) * `122565`: [Try to write the panic message with a single `write_all` call](https://www.github.com/rust-lang/rust/issues/122565) * `135040`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/135040) * `135035`: [Fix formatting command](https://www.github.com/rust-lang/rust/issues/135035) * `135033`: [try to dedup me in the mailmap](https://www.github.com/rust-lang/rust/issues/135033) * `135029`: [Update mailmap](https://www.github.com/rust-lang/rust/issues/135029) * `135027`: [Remove range-metadata amdgpu workaround](https://www.github.com/rust-lang/rust/issues/135027) * `135016`: [Ping me for rustc-dev-guide subtree changes on this repo](https://www.github.com/rust-lang/rust/issues/135016) * `135014`: [bootstrap: Overhaul and simplify the `tool_extended!` macro](https://www.github.com/rust-lang/rust/issues/135014) * `135023`: [bootstrap: flip `compile::Rustc` vs `compile::Assemble`](https://www.github.com/rust-lang/rust/issues/135023) * `135009`: [Fix doc for missing Box allocator consistency](https://www.github.com/rust-lang/rust/issues/135009) * `134907`: [Turn rustc-dev-guide into a Josh subtree](https://www.github.com/rust-lang/rust/issues/134907) * `130060`: [Autodiff Upstreaming - rustc_codegen_llvm changes](https://www.github.com/rust-lang/rust/issues/130060) * `135005`: [Rollup of 5 pull requests](https://www.github.com/rust-lang/rust/issues/135005) * `135000`: [Fix ICE when opaque captures a duplicated/invalid lifetime](https://www.github.com/rust-lang/rust/issues/135000) * `134985`: [Remove qualification of `std::cmp::Ordering` in `Ord` doc](https://www.github.com/rust-lang/rust/issues/134985) * `134984`: [`ObligationCause` construction tweaks in typeck](https://www.github.com/rust-lang/rust/issues/134984) * `134973`: [Fix typos](https://www.github.com/rust-lang/rust/issues/134973) * `134967`: [handle submodules automatically on `doc` steps](https://www.github.com/rust-lang/rust/issues/134967) * `134080`: [Avoid use of LFS64 symbols on Emscripten](https://www.github.com/rust-lang/rust/issues/134080) * `134964`: [Run Python formatting check in tidy on CI](https://www.github.com/rust-lang/rust/issues/134964) * `134969`: [char to_digit: avoid unnecessary casts to u64](https://www.github.com/rust-lang/rust/issues/134969) * `134992`: [Rollup of 6 pull requests](https://www.github.com/rust-lang/rust/issues/134992) * `134979`: [Provide structured suggestion for `impl Default` of type where all fields have defaults](https://www.github.com/rust-lang/rust/issues/134979) * `134950`: [bootstrap: Overhaul and simplify the `tool_check_step!` macro](https://www.github.com/rust-lang/rust/issues/134950) * `134945`: [Some small nits to the borrowck suggestions for mutating a map through index](https://www.github.com/rust-lang/rust/issues/134945) * `134877`: [add suggestion for wrongly ordered format parameters](https://www.github.com/rust-lang/rust/issues/134877) * `133292`: [E0277: suggest dereferencing function arguments in more cases](https://www.github.com/rust-lang/rust/issues/133292) * `131439`: [Remove allowing static_mut_refs lint](https://www.github.com/rust-lang/rust/issues/131439) * `134926`: [Update books](https://www.github.com/rust-lang/rust/issues/134926) * `134988`: [Rollup of 8 pull requests](https://www.github.com/rust-lang/rust/issues/134988) * `134975`: [Revert style guide rhs break](https://www.github.com/rust-lang/rust/issues/134975) * `134974`: [Revert #119515 single line where clause style guide](https://www.github.com/rust-lang/rust/issues/134974) * `134972`: [add .mailmap entry for myself](https://www.github.com/rust-lang/rust/issues/134972) * `134971`: [chore: fix typos](https://www.github.com/rust-lang/rust/issues/134971) * `134968`: [Print how to rebless Python formatting in tidy](https://www.github.com/rust-lang/rust/issues/134968) * `134861`: [Add GUI test for item info elements color](https://www.github.com/rust-lang/rust/issues/134861) * `133486`: [borrowck diagnostics: make `add_move_error_suggestions` use the HIR rather than `SourceMap`](https://www.github.com/rust-lang/rust/issues/133486) * `132474`: [Add more mailmap entries](https://www.github.com/rust-lang/rust/issues/132474) * `134987`: [Update cargo](https://www.github.com/rust-lang/rust/issues/134987) Co-authored-by: Yuri Astrakhan <yuriastrakhan@gmail.com> Co-authored-by: Noratrieb <48135649+Noratrieb@users.noreply.github.com> Co-authored-by: Christopher Speir <chris@cbspeir.dev> Co-authored-by: Kajetan Puchalski <kajetan.puchalski@tuta.io> Co-authored-by: Urgau <3616612+Urgau@users.noreply.github.com> Co-authored-by: León Orell Valerian Liehr <me@fmease.dev> Co-authored-by: Onur Özkan <work@onurozkan.dev> Co-authored-by: Yoh Deadfall <yoh.deadfall@hotmail.com> Co-authored-by: 许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com> Co-authored-by: Kajetan Puchalski <kajetan.puchalski@kajetanp.co.uk> Co-authored-by: Jakub Beránek <berykubik@gmail.com> Co-authored-by: Michael Howell <michael@notriddle.com> Co-authored-by: Stuart Cook <Zalathar@users.noreply.github.com> Co-authored-by: Tbkhi <dining-03town@icloud.com> Co-authored-by: mu001999 <mu001999@outlook.com> Co-authored-by: Juniper Tyree <50025784+juntyr@users.noreply.github.com> Co-authored-by: lolbinarycat <dogedoge61+github@gmail.com> Co-authored-by: Ralf Jung <post@ralfj.de> Co-authored-by: Thomas Nyman <thomasnyman@users.noreply.github.com> Co-authored-by: David Wood <david.wood2@arm.com> Co-authored-by: Michael Goulet <michael@errs.io>
cc #18745