@@ -343,18 +343,18 @@ compilation might inadvertently succeed!
343
343
344
344
Sometimes there is a third case. You believe that an error has been reported, but you believe it
345
345
would'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.
348
348
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
350
350
351
351
For added safety, it's not actually possible to produce a ` TyKind::Error ` value
352
352
outside of [ ` rustc_middle::ty ` ] [ ty ] ; there is a private member of
353
353
` TyKind::Error ` that prevents it from being constructable elsewhere. Instead,
354
354
one should use the [ ` TyCtxt::ty_error ` ] [ terr ] or
355
355
[ ` 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
358
358
span and message to [ ` ty_error_with_message ` ] [ terrmsg ] instead to avoid
359
359
delaying a redundant span bug.
360
360
0 commit comments