diff options
| author | Matthias Krüger <476013+matthiaskrgr@users.noreply.github.com> | 2025-07-19 08:55:37 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-07-19 08:55:37 +0200 |
| commit | bd23cd62f2d5aaf52d17c4052954643a7ec42b6e (patch) | |
| tree | 5035c37a52774617f19fe4955c0a3fdab74e6843 /compiler/rustc_errors/src | |
| parent | 4b9471771bb23c0a39c8f3b62c756ac63ce7ac22 (diff) | |
| parent | c58e0bd09368a96dbde1ec1f30e36764e1431125 (diff) | |
| download | rust-bd23cd62f2d5aaf52d17c4052954643a7ec42b6e.tar.gz rust-bd23cd62f2d5aaf52d17c4052954643a7ec42b6e.zip | |
Rollup merge of #144103 - xizheyin:emit-unless, r=compiler-errors
Rename `emit_unless` to `emit_unless_delay` `emit_unless` is very unintuitive and confusing. The first impression is as if it will only emit if the parameter is true, without the altnative "delay as a bug". `emit_unless_delay` expresses two things: 1. emit unless the `delay` parameter is true 2. either *emit immediately* or *delay as bug* r? `@compiler-errors`
Diffstat (limited to 'compiler/rustc_errors/src')
| -rw-r--r-- | compiler/rustc_errors/src/diagnostic.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_errors/src/diagnostic.rs b/compiler/rustc_errors/src/diagnostic.rs index a128f8d31a1..96c7ba6ed27 100644 --- a/compiler/rustc_errors/src/diagnostic.rs +++ b/compiler/rustc_errors/src/diagnostic.rs @@ -1421,7 +1421,7 @@ impl<'a, G: EmissionGuarantee> Diag<'a, G> { /// /// See `emit` and `delay_as_bug` for details. #[track_caller] - pub fn emit_unless(mut self, delay: bool) -> G::EmitResult { + pub fn emit_unless_delay(mut self, delay: bool) -> G::EmitResult { if delay { self.downgrade_to_delayed_bug(); } |
