You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Stable**: No (tracking issue: [#3187](https://github.com/rust-lang/rustfmt/issues/3187))
1266
+
1267
+
#### `Preserve` (default):
1268
+
1269
+
Leave the literal as-is.
1270
+
1271
+
#### `Always`:
1272
+
1273
+
Add a trailing zero to the literal:
1274
+
1275
+
```rust
1276
+
fnmain() {
1277
+
letvalues= [1.0, 2.0e10, 3.0f32];
1278
+
}
1279
+
```
1280
+
1281
+
#### `IfNoPostfix`:
1282
+
1283
+
Add a trailing zero by default. If the literal contains an exponent or a suffix, the zero
1284
+
and the preceding period are removed:
1285
+
1286
+
```rust
1287
+
fnmain() {
1288
+
letvalues= [1.0, 2e10, 3f32];
1289
+
}
1290
+
```
1291
+
1292
+
#### `Never`:
1293
+
1294
+
Remove the trailing zero. If the literal contains an exponent or a suffix, the preceding
1295
+
period is also removed:
1296
+
1297
+
```rust
1298
+
fnmain() {
1299
+
letvalues= [1., 2e10, 3f32];
1300
+
}
1301
+
```
1302
+
1259
1303
## `hide_parse_errors`
1260
1304
1261
1305
This option is deprecated and has been renamed to `show_parse_errors` to avoid confusion around the double negative default of `hide_parse_errors=false`.
0 commit comments