about summary refs log tree commit diff
path: root/compiler/rustc_errors/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-30 14:07:29 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-12-02 08:58:25 +1100
commit95be8b21896c748543a81135177e6e3286ae21f2 (patch)
tree7963f4e4612507fd67a35de0e3c2ae8b92ddffb4 /compiler/rustc_errors/src
parentb2a856ea3cb0087e52f90a9ac7e4e32f0b52a66e (diff)
downloadrust-95be8b21896c748543a81135177e6e3286ae21f2.tar.gz
rust-95be8b21896c748543a81135177e6e3286ae21f2.zip
Remove an unnecessary local variable.
Diffstat (limited to 'compiler/rustc_errors/src')
-rw-r--r--compiler/rustc_errors/src/lib.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs
index 0233cccbf43..6e913282c59 100644
--- a/compiler/rustc_errors/src/lib.rs
+++ b/compiler/rustc_errors/src/lib.rs
@@ -1055,8 +1055,7 @@ impl Handler {
 
     #[rustc_lint_diagnostics]
     pub fn warn(&self, msg: impl Into<DiagnosticMessage>) {
-        let mut db = DiagnosticBuilder::new(self, Warning(None), msg);
-        db.emit();
+        DiagnosticBuilder::new(self, Warning(None), msg).emit();
     }
 
     #[rustc_lint_diagnostics]