diff options
| author | bors <bors@rust-lang.org> | 2023-03-06 00:43:06 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-03-06 00:43:06 +0000 |
| commit | 8c0f83d773370150a6ea1b40b36b55566e40a73c (patch) | |
| tree | f5b92cab22d822c840c432787542104a53684ace /compiler/rustc_mir_transform/src | |
| parent | 816f958ac3db8931855c42649809aead01d20d9b (diff) | |
| parent | c08c69b4b11aa45da931fd025ff2648aebd24d46 (diff) | |
| download | rust-8c0f83d773370150a6ea1b40b36b55566e40a73c.tar.gz rust-8c0f83d773370150a6ea1b40b36b55566e40a73c.zip | |
Auto merge of #108789 - matthiaskrgr:rollup-nyurto8, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #108244 (Add test for semicolon recovery ICE) - #108746 (Don't project to RPITIT that has no default value) - #108764 (Tweaks to -Zdrop-tracking-mir) - #108770 (Improve documentation and argument naming of some TyCtxt methods) - #108773 (x fmt: Only check modified files locally) - #108775 (Use the correct bound vars in return type suggestion.) - #108776 (Make `x test tidy` less noisy) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_mir_transform/src')
| -rw-r--r-- | compiler/rustc_mir_transform/src/generator.rs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/compiler/rustc_mir_transform/src/generator.rs b/compiler/rustc_mir_transform/src/generator.rs index 2e97312ee50..746326f9bde 100644 --- a/compiler/rustc_mir_transform/src/generator.rs +++ b/compiler/rustc_mir_transform/src/generator.rs @@ -1872,12 +1872,14 @@ fn check_must_not_suspend_def( data: SuspendCheckData<'_>, ) -> bool { if let Some(attr) = tcx.get_attr(def_id, sym::must_not_suspend) { - let msg = format!( - "{}`{}`{} held across a suspend point, but should not be", - data.descr_pre, - tcx.def_path_str(def_id), - data.descr_post, - ); + let msg = rustc_errors::DelayDm(|| { + format!( + "{}`{}`{} held across a suspend point, but should not be", + data.descr_pre, + tcx.def_path_str(def_id), + data.descr_post, + ) + }); tcx.struct_span_lint_hir( rustc_session::lint::builtin::MUST_NOT_SUSPEND, hir_id, |
