Conversation
The `#[allow(rustdoc:private_intra_doc_links)]` isn't necessary. Also sort them, as is done in other files like `compiler/rustc_errors/src/lib.rs`.
Explicit imports are more standard nowadays and easier to read.
Some minor (English only) heroics are performed to print error messages like "5th rule of macro `m` is never used". The form "rule rust-lang#5 of macro `m` is never used" is just as good and much simpler to implement.
| } | ||
|
|
||
| /// Convert the given number into the corresponding ordinal | ||
| pub(crate) fn ordinalize(v: usize) -> String { |
| use rustc_middle::middle::privacy::{EffectiveVisibilities, EffectiveVisibility}; | ||
| use rustc_middle::ty::Visibility; | ||
| use std::mem; | ||
| use tracing::info; |
There was a problem hiding this comment.
Are all of these additions from tracing in different files needed?
There was a problem hiding this comment.
Yes. The #[macro_use] extern crate tracing; gave us implicit import of all tracing macros. With that gone, we must do explicit imports, and tracing macros are used in lots of places.
| --> $DIR/unused-macro-rules.rs:8:5 | ||
| | | ||
| LL | (two) => { 2 }; | ||
| | ^^^^^ |
There was a problem hiding this comment.
Future note: we should emit a single error for all of the unused rules in a single macro.
|
@bors r+ |
|
☀️ Test successful - checks-actions |
|
Finished benchmarking commit (36c0a6d): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)Results (primary 1.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (primary 1.6%, secondary 1.1%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 668.851s -> 669.26s (0.06%) |
Some improvements I found while looking through this code.
r? @estebank