Skip to content

Commit b6339da

Browse files
committed
Fix nits in #40
1 parent 92154f7 commit b6339da

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ The `rustc_plugin` framework is responsible for marshalling arguments from the t
4444

4545
Normally, Rust libraries have a [minimum supported Rust version][msrv] because they promise to not use any breaking features implemented after that version. Rust compiler plugins are the opposite — they have a **maximum** supported Rust version (MaxSRV). A compiler plugin cannot analyze programs that use features implemented after the release date of the plugin's toolchain. The MaxSRV for every version of `rustc_plugin` is listed below:
4646

47-
* v0.14 (`nightly-2025-08-20`) - rustc 1.87
47+
* v0.14 (`nightly-2025-08-20`) - rustc 1.90
4848
* v0.13 (`nightly-2025-03-03`) - rustc 1.86
4949
* v0.12 (`nightly-2024-12-15`) - rustc 1.84
5050
* v0.11 (`nightly-2024-12-01`) - rustc 1.84

crates/rustc_plugin/examples/print-all-items/src/lib.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,17 +112,16 @@ struct PrintVisitor<'tcx> {
112112

113113
impl<'tcx> Visitor<'tcx> for PrintVisitor<'tcx> {
114114
fn visit_item(&mut self, item: &'tcx Item<'tcx>) -> Self::Result {
115-
let mut msg = if let Some(ident) = item.kind.ident() {
116-
format!(
115+
let mut msg = match item.kind.ident() {
116+
Some(ident) => format!(
117117
"There is an item \"{}\" of type \"{}\"",
118118
ident,
119119
self.tcx.def_descr(item.owner_id.to_def_id())
120-
)
121-
} else {
122-
format!(
120+
),
121+
None => format!(
123122
"There is an item of type \"{}\"",
124123
self.tcx.def_descr(item.owner_id.to_def_id())
125-
)
124+
),
126125
};
127126
if self.args.allcaps {
128127
msg = msg.to_uppercase();

0 commit comments

Comments
 (0)