about summary refs log tree commit diff
path: root/compiler/rustc_macros/src/diagnostics/mod.rs
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2024-05-22 14:45:48 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2024-05-23 03:21:12 +0200
commit366ef954073bdaebe83e6619430ae0e8d17b9850 (patch)
tree8a7774e98777b93d748e184d2d8c308c7b26edda /compiler/rustc_macros/src/diagnostics/mod.rs
parentb54dd08a84f3c07efbc2aaf63c3df219ae680a03 (diff)
downloadrust-366ef954073bdaebe83e6619430ae0e8d17b9850.tar.gz
rust-366ef954073bdaebe83e6619430ae0e8d17b9850.zip
Slightly clean up some lint infra code
* inline `LintBuffer::add_lint`, it only had a single use
* update a lint infra example code snippet
  * it used the wrong API (the snippet isn't tested)
  * presumably the arguments were updated from builder to diag struct style
    at some point without updating the method
Diffstat (limited to 'compiler/rustc_macros/src/diagnostics/mod.rs')
-rw-r--r--compiler/rustc_macros/src/diagnostics/mod.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/rustc_macros/src/diagnostics/mod.rs b/compiler/rustc_macros/src/diagnostics/mod.rs
index 389d88bebc7..134045d0644 100644
--- a/compiler/rustc_macros/src/diagnostics/mod.rs
+++ b/compiler/rustc_macros/src/diagnostics/mod.rs
@@ -91,7 +91,7 @@ pub fn diagnostic_derive(mut s: Structure<'_>) -> TokenStream {
 /// Then, later, to emit the error:
 ///
 /// ```ignore (rust)
-/// cx.span_lint(INVALID_ATOMIC_ORDERING, fail_order_arg_span, AtomicOrderingInvalidLint {
+/// cx.emit_span_lint(INVALID_ATOMIC_ORDERING, fail_order_arg_span, AtomicOrderingInvalidLint {
 ///     method,
 ///     success_ordering,
 ///     fail_ordering,