mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 12:54:58 +00:00
Replace x
with it
This commit is contained in:
parent
4125fea0a7
commit
3a1054fc1c
42 changed files with 590 additions and 582 deletions
|
@ -422,10 +422,10 @@ pub(super) fn definition(
|
|||
|&it| {
|
||||
if !it.parent_enum(db).is_data_carrying(db) {
|
||||
match it.eval(db) {
|
||||
Ok(x) => {
|
||||
Some(if x >= 10 { format!("{x} ({x:#X})") } else { format!("{x}") })
|
||||
Ok(it) => {
|
||||
Some(if it >= 10 { format!("{it} ({it:#X})") } else { format!("{it}") })
|
||||
}
|
||||
Err(_) => it.value(db).map(|x| format!("{x:?}")),
|
||||
Err(_) => it.value(db).map(|it| format!("{it:?}")),
|
||||
}
|
||||
} else {
|
||||
None
|
||||
|
@ -437,7 +437,7 @@ pub(super) fn definition(
|
|||
Definition::Const(it) => label_value_and_docs(db, it, |it| {
|
||||
let body = it.render_eval(db);
|
||||
match body {
|
||||
Ok(x) => Some(x),
|
||||
Ok(it) => Some(it),
|
||||
Err(_) => {
|
||||
let source = it.source(db)?;
|
||||
let mut body = source.value.body()?.syntax().clone();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue