@@ -343,18 +343,18 @@ compilation might inadvertently succeed!
343343
344344Sometimes there is a third case. You believe that an error has been reported, but you believe it
345345would've been reported earlier in the compilation, not locally. In that case, you can invoke
346- [ ` delay_span_bug ` ] This will make a note that you expect compilation to yield an error -- if however
347- compilation should succeed, then it will trigger a compiler bug report.
346+ [ ` span_delayed_bug ` ] This will make a note that you expect compilation to yield an error -- if
347+ however compilation should succeed, then it will trigger a compiler bug report.
348348
349- [ `delay_span_bug ` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_session /struct.Session .html#method.delay_span_bug
349+ [ `span_delayed_bug ` ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_errors /struct.DiagCtxt .html#method.span_delayed_bug
350350
351351For added safety, it's not actually possible to produce a ` TyKind::Error ` value
352352outside of [ ` rustc_middle::ty ` ] [ ty ] ; there is a private member of
353353` TyKind::Error ` that prevents it from being constructable elsewhere. Instead,
354354one should use the [ ` TyCtxt::ty_error ` ] [ terr ] or
355355[ ` TyCtxt::ty_error_with_message ` ] [ terrmsg ] methods. These methods automatically
356- call ` delay_span_bug ` before returning an interned ` Ty ` of kind ` Error ` . If you
357- were already planning to use [ ` delay_span_bug ` ] , then you can just pass the
356+ call ` span_delayed_bug ` before returning an interned ` Ty ` of kind ` Error ` . If you
357+ were already planning to use [ ` span_delayed_bug ` ] , then you can just pass the
358358span and message to [ ` ty_error_with_message ` ] [ terrmsg ] instead to avoid
359359delaying a redundant span bug.
360360
0 commit comments