We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0916616 commit 135db79Copy full SHA for 135db79
compiler/rustc_mir_transform/src/generator.rs
@@ -1872,12 +1872,14 @@ fn check_must_not_suspend_def(
1872
data: SuspendCheckData<'_>,
1873
) -> bool {
1874
if let Some(attr) = tcx.get_attr(def_id, sym::must_not_suspend) {
1875
- let msg = format!(
1876
- "{}`{}`{} held across a suspend point, but should not be",
1877
- data.descr_pre,
1878
- tcx.def_path_str(def_id),
1879
- data.descr_post,
1880
- );
+ 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,
1881
+ )
1882
+ });
1883
tcx.struct_span_lint_hir(
1884
rustc_session::lint::builtin::MUST_NOT_SUSPEND,
1885
hir_id,
0 commit comments