do not 'return' in 'throw_' macros#70138
Conversation
|
wtf... how does fn foo() -> Result<String, ()> {
Err(())?
}compile?! I can only guess that it defaults the |
|
@bors r+ |
|
📌 Commit a39875b has been approved by |
|
@bors r- |
|
@oli-obk wrote:
|
|
@bors r=oli-obk |
|
📌 Commit a39875b has been approved by |
If you change the macro to |
|
📌 Commit e46b3c2 has been approved by |
Rollup of 8 pull requests Successful merges: - rust-lang#67888 (Prefetch some queries used by the metadata encoder) - rust-lang#69934 (Update the mir inline costs) - rust-lang#69965 (Refactorings to get rid of rustc_codegen_utils) - rust-lang#70054 (Build dist-android with --enable-profiler) - rust-lang#70089 (rustc_infer: remove InferCtxt::closure_sig as the FnSig is always shallowly known.) - rust-lang#70092 (hir: replace "items" terminology with "nodes" where appropriate.) - rust-lang#70138 (do not 'return' in 'throw_' macros) - rust-lang#70151 (Update stdarch submodule) Failed merges: - rust-lang#70074 (Expand: nix all fatal errors) r? @ghost
In #69839 we turned a closure into a
tryblock, but it turns out that does not work with ourthrow_macros, whichreturnso they skip thetry.Here we fix that. For some reason that means we also have to remove some
;.r? @oli-obk