diff options
| author | bors <bors@rust-lang.org> | 2022-10-01 03:56:21 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-10-01 03:56:21 +0000 |
| commit | de341fe668fd821f701ca970c897d167104f0a17 (patch) | |
| tree | 90b54768b33cc51c02935bc4fe79b1ec13d85371 /compiler/rustc_errors/src | |
| parent | c5b105dc9a14116248512ba6fec8d3f0f4f24f0f (diff) | |
| parent | 2fadfe0284370a31a453b8e90b9eb357475164f5 (diff) | |
| download | rust-de341fe668fd821f701ca970c897d167104f0a17.tar.gz rust-de341fe668fd821f701ca970c897d167104f0a17.zip | |
Auto merge of #102526 - matthiaskrgr:rollup-9o6p98c, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #102361 (Fix ICE in const_trait check code) - #102373 (Flush delayed bugs before codegen) - #102483 (create def ids for impl traits during ast lowering) - #102490 (Generate synthetic region from `impl` even in closure body within an associated fn) - #102492 (Don't lower assoc bindings just to deny them) - #102493 (Group together more size assertions.) - #102521 (rustdoc: add missing margin to no-docblock methods) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/lib.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index d3effb7c1c0..c6ede209e65 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -66,7 +66,7 @@ pub type PErr<'a> = DiagnosticBuilder<'a, ErrorGuaranteed>; pub type PResult<'a, T> = Result<T, PErr<'a>>; // `PResult` is used a lot. Make sure it doesn't unintentionally get bigger. -// (See also the comment on `DiagnosticBuilder`'s `diagnostic` field.) +// (See also the comment on `DiagnosticBuilderInner`'s `diagnostic` field.) #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] rustc_data_structures::static_assert_size!(PResult<'_, ()>, 16); #[cfg(all(target_arch = "x86_64", target_pointer_width = "64"))] @@ -1134,6 +1134,12 @@ impl Handler { ); std::mem::take(&mut self.inner.borrow_mut().fulfilled_expectations) } + + pub fn flush_delayed(&self) { + let mut inner = self.inner.lock(); + let bugs = std::mem::replace(&mut inner.delayed_span_bugs, Vec::new()); + inner.flush_delayed(bugs, "no errors encountered even though `delay_span_bug` issued"); + } } impl HandlerInner { |
