diff options
| author | bors <bors@rust-lang.org> | 2022-02-01 03:58:32 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2022-02-01 03:58:32 +0000 |
| commit | 25862ffc8d360b34dd8ec82a2f01750aaab976b7 (patch) | |
| tree | d9ef0def054f8bc2a497a7d3b5b3d17ed8c15f0f /src/tools | |
| parent | a6cd4aa9a784e3d2e54bca2a1b41082fda67310d (diff) | |
| parent | f5a32711dc14ea66510bd5c8a21763183ee5fc99 (diff) | |
| download | rust-25862ffc8d360b34dd8ec82a2f01750aaab976b7.tar.gz rust-25862ffc8d360b34dd8ec82a2f01750aaab976b7.zip | |
Auto merge of #93259 - eddyb:diagbld-scalar-pair, r=jackh726
rustc_errors: only box the `diagnostic` field in `DiagnosticBuilder`. I happened to need to do the first change (replacing `allow_suggestions` with equivalent functionality on `Diagnostic` itself) as part of a larger change, and noticed that there's only two fields left in `DiagnosticBuilderInner`. So with this PR, instead of a single pointer, `DiagnosticBuilder` is two pointers, which should work just as well for passing *it* by value (and may even work better wrt some operations, though probably not by much). But anything that was already taking advantage of `DiagnosticBuilder` being a single pointer, and wrapping it further (e.g. `Result<T, DiagnosticBuilder>` w/ non-ZST `T`), ~~will probably see a slowdown~~, so I want to do a perf run before even trying to propose this.
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/rustfmt/src/parse/session.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs index 624fed0d2de..7fc3778376c 100644 --- a/src/tools/rustfmt/src/parse/session.rs +++ b/src/tools/rustfmt/src/parse/session.rs @@ -315,7 +315,7 @@ mod tests { code: None, message: vec![], children: vec![], - suggestions: vec![], + suggestions: Ok(vec![]), span: span.unwrap_or_else(MultiSpan::new), sort_span: DUMMY_SP, is_lint: false, |
