@@ -338,12 +338,16 @@ type of the literal. The integer suffix must be the name of one of the
338
338
integral types: ` u8 ` , ` i8 ` , ` u16 ` , ` i16 ` , ` u32 ` , ` i32 ` , ` u64 ` , ` i64 ` ,
339
339
` isize ` , or ` usize ` .
340
340
341
- The type of an _ unsuffixed_ integer literal is determined by type inference.
342
- If an integer type can be _ uniquely_ determined from the surrounding program
343
- context, the unsuffixed integer literal has that type. If the program context
344
- underconstrains the type, it defaults to the signed 32-bit integer ` i32 ` ; if
345
- the program context overconstrains the type, it is considered a static type
346
- error.
341
+ The type of an _ unsuffixed_ integer literal is determined by type inference:
342
+
343
+ * If an integer type can be _ uniquely_ determined from the surrounding
344
+ program context, the unsuffixed integer literal has that type.
345
+
346
+ * If the program context underconstrains the type, it defaults to the
347
+ signed 32-bit integer ` i32 ` .
348
+
349
+ * If the program context overconstrains the type, it is considered a
350
+ static type error.
347
351
348
352
Examples of integer literals of various forms:
349
353
@@ -371,12 +375,17 @@ The suffix forcibly sets the type of the literal. There are two valid
371
375
_ floating-point suffixes_ , ` f32 ` and ` f64 ` (the 32-bit and 64-bit floating point
372
376
types), which explicitly determine the type of the literal.
373
377
374
- The type of an _ unsuffixed_ floating-point literal is determined by type
375
- inference. If a floating-point type can be _ uniquely_ determined from the
376
- surrounding program context, the unsuffixed floating-point literal has that type.
377
- If the program context underconstrains the type, it defaults to double-precision ` f64 ` ;
378
- if the program context overconstrains the type, it is considered a static type
379
- error.
378
+ The type of an _ unsuffixed_ floating-point literal is determined by
379
+ type inference:
380
+
381
+ * If a floating-point type can be _ uniquely_ determined from the
382
+ surrounding program context, the unsuffixed floating-point literal
383
+ has that type.
384
+
385
+ * If the program context underconstrains the type, it defaults to ` f64 ` .
386
+
387
+ * If the program context overconstrains the type, it is considered a
388
+ static type error.
380
389
381
390
Examples of floating-point literals of various forms:
382
391
0 commit comments