Commit 552bed8
committed
Remove
It seems very wrong to have a `-Ztreat-err-as-bug` check here before the
error is even emitted.
Once that's done:
- `into_diagnostic` is infallible, so its return type doesn't need the
`Option`;
- the `&'a DiagCtxt` also isn't needed, because only one callsite uses
it, and it already have access to it via `self.dcx`;
- the comments about dcx disabling buffering are no longer true, this is
unconditional now;
- and the `debug!` seems unnecessary... the comment greatly overstates
its importance because few diagnostics come through `into_diagnostic`,
and `-Ztrack-diagnostics` exists anyway.DiagnosticBuilder::into_diagnostic from -Ztreat-err-as-bug consideration.1 parent a0f5431 commit 552bed8
1 file changed
+6
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
258 | | - | |
259 | | - | |
260 | 258 | | |
261 | | - | |
262 | | - | |
263 | | - | |
| 259 | + | |
264 | 260 | | |
265 | 261 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
273 | | - | |
274 | | - | |
275 | | - | |
276 | | - | |
277 | | - | |
278 | | - | |
279 | | - | |
280 | | - | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
281 | 265 | | |
282 | 266 | | |
283 | | - | |
284 | | - | |
| 267 | + | |
285 | 268 | | |
286 | | - | |
| 269 | + | |
287 | 270 | | |
288 | 271 | | |
289 | 272 | | |
| |||
0 commit comments