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
This commit is contained in:
parent
b54dd08a84
commit
366ef95407
2 changed files with 10 additions and 17 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue