Skip to content

Commit fda1935

Browse files
committed
Last type annotation in config_data!
1 parent 46110f4 commit fda1935

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

crates/rust-analyzer/src/config.rs

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ config_data! {
472472
/// Whether to prefer using parameter names as the name for elided lifetime hints if possible.
473473
inlayHints_lifetimeElisionHints_useParameterNames: bool = false,
474474
/// Maximum length for inlay hints. Set to null to have an unlimited length.
475-
inlayHints_maxLength: Option<usize> = Some(25_usize),
475+
inlayHints_maxLength: Option<usize> = Some(25),
476476
/// Whether to show function parameter name inlay hints at the call
477477
/// site.
478478
inlayHints_parameterHints_enable: bool = true,
@@ -2230,7 +2230,7 @@ macro_rules! _config_data {
22302230
error_sink,
22312231
stringify!($field),
22322232
None$(.or(Some(stringify!($alias))))*,
2233-
$default as $ty,
2233+
{ let default_: $ty = $default; default_ },
22342234
),
22352235
)*}
22362236
}
@@ -2248,7 +2248,7 @@ macro_rules! _config_data {
22482248
error_sink,
22492249
stringify!($field2),
22502250
None$(.or(Some(stringify!($alias2))))*,
2251-
$default2 as $ty2,
2251+
{ let default_: $ty2 = $default2; default_ },
22522252
),
22532253
)*}
22542254
}
@@ -2265,7 +2265,7 @@ macro_rules! _config_data {
22652265
error_sink,
22662266
stringify!($field3),
22672267
None$(.or(Some(stringify!($alias3))))*,
2268-
$default3 as $ty3,
2268+
{ let default_: $ty3 = $default3; default_ },
22692269
),
22702270
)*}
22712271
}
@@ -2288,7 +2288,7 @@ macro_rules! _config_data {
22882288
error_sink,
22892289
stringify!($field),
22902290
None$(.or(Some(stringify!($alias))))*,
2291-
$default as $ty,
2291+
{ let default_: $ty = $default; default_ },
22922292
),
22932293
)*
22942294
$(
@@ -2297,7 +2297,7 @@ macro_rules! _config_data {
22972297
error_sink,
22982298
stringify!($field2),
22992299
None$(.or(Some(stringify!($alias2))))*,
2300-
$default2 as $ty2,
2300+
{ let default_: $ty2 = $default2; default_ },
23012301
),
23022302
)*
23032303
$(
@@ -2306,7 +2306,7 @@ macro_rules! _config_data {
23062306
error_sink,
23072307
stringify!($field3),
23082308
None$(.or(Some(stringify!($alias3))))*,
2309-
$default3 as $ty3,
2309+
{ let default_: $ty3 = $default3; default_ },
23102310
),
23112311
)*}
23122312
}
@@ -2318,7 +2318,7 @@ macro_rules! _config_data {
23182318
error_sink,
23192319
stringify!($field),
23202320
None$(.or(Some(stringify!($alias))))*,
2321-
$default as $ty,
2321+
{ let default_: $ty = $default; default_ },
23222322
),
23232323
)*
23242324
$(
@@ -2327,7 +2327,7 @@ macro_rules! _config_data {
23272327
error_sink,
23282328
stringify!($field2),
23292329
None$(.or(Some(stringify!($alias2))))*,
2330-
$default2 as $ty2,
2330+
{ let default_: $ty2 = $default2; default_ },
23312331
),
23322332
)*
23332333
$(
@@ -2336,7 +2336,7 @@ macro_rules! _config_data {
23362336
error_sink,
23372337
stringify!($field3),
23382338
None$(.or(Some(stringify!($alias3))))*,
2339-
$default3 as $ty3,
2339+
{ let default_: $ty3 = $default3; default_ },
23402340
),
23412341
)*}
23422342
}
@@ -2347,19 +2347,19 @@ macro_rules! _config_data {
23472347
let field = stringify!($field);
23482348
let ty = stringify!($ty);
23492349

2350-
(field, ty, &[$($doc),*], serde_json::to_string(&($default as $ty)).unwrap().as_str())
2350+
(field, ty, &[$($doc),*], serde_json::to_string(&{ let default_: $ty = $default; default_ }).unwrap().as_str())
23512351
},)*
23522352
$({
23532353
let field = stringify!($field2);
23542354
let ty = stringify!($ty2);
23552355

2356-
(field, ty, &[$($doc2),*], serde_json::to_string(&($default2 as $ty2)).unwrap().as_str())
2356+
(field, ty, &[$($doc2),*], serde_json::to_string(&{ let default_: $ty2 = $default2; default_ }).unwrap().as_str())
23572357
},)*
23582358
$({
23592359
let field = stringify!($field3);
23602360
let ty = stringify!($ty3);
23612361

2362-
(field, ty, &[$($doc3),*], serde_json::to_string(&($default3 as $ty3)).unwrap().as_str())
2362+
(field, ty, &[$($doc3),*], serde_json::to_string(&{ let default_: $ty3 = $default3; default_ }).unwrap().as_str())
23632363
},)*
23642364
])
23652365
}

0 commit comments

Comments
 (0)