Skip to content

Commit

Permalink
address review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
tshepang committed Jun 21, 2022
1 parent 2cba1c6 commit 9103466
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/diagnostics.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,13 +280,13 @@ There are two main ways to find where a given error is emitted:
will treat the first error being emitted as an Internal Compiler Error, which
allows you to get a
stack trace at the point the error has been emitted. Change the `1` to
something else if you wish to trigger on a later error. One limitation
with this approach is that some calls get elided from the stack trace because
they get inlined in the compiled `rustc`.
Another limitation is the same problem we faced with
the prior approach, where the _construction_ of the error is far away from
where it is _emitted_. In some cases, we buffer multiple errors in order to
emit them in order.
something else if you whish to trigger on a later error.

There are limitations with this approach:
- Some calls get elided from the stack trace because they get inlined in the compiled `rustc`.
- The _construction_ of the error is far away from where it is _emitted_,
a problem similar to the one we faced with the `grep` approach.
In some cases, we buffer multiple errors in order to emit them in order.

The regular development practices apply: judicious use of `debug!()` statements
and use of a debugger to trigger break points in order to figure out in what
Expand Down

0 comments on commit 9103466

Please sign in to comment.