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 /compiler/rustc_middle | |
| parent | a6cd4aa9a784e3d2e54bca2a1b41082fda67310d (diff) | |
| parent | f5a32711dc14ea66510bd5c8a21763183ee5fc99 (diff) | |
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 'compiler/rustc_middle')
| -rw-r--r-- | compiler/rustc_middle/src/lint.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_middle/src/lint.rs b/compiler/rustc_middle/src/lint.rs index eef10356ed2..c6226c69f30 100644 --- a/compiler/rustc_middle/src/lint.rs +++ b/compiler/rustc_middle/src/lint.rs @@ -262,7 +262,7 @@ pub fn struct_lint_level<'s, 'd>( if err.span.primary_spans().iter().any(|s| in_external_macro(sess, *s)) { // Any suggestions made here are likely to be incorrect, so anything we // emit shouldn't be automatically fixed by rustfix. - err.allow_suggestions(false); + err.disable_suggestions(); // If this is a future incompatible that is not an edition fixing lint // it'll become a hard error, so we have to emit *something*. Also, |
