| ... | @@ -7455,6 +7455,10 @@ fn add(a: i32, b: i32) i32 { return a + b; } | ... | @@ -7455,6 +7455,10 @@ fn add(a: i32, b: i32) i32 { return a + b; } |
| 7455 | Attempting to convert a number which is out of range of the destination type results in | 7455 | Attempting to convert a number which is out of range of the destination type results in |
| 7456 | safety-protected {#link|Undefined Behavior#}. | 7456 | safety-protected {#link|Undefined Behavior#}. |
| 7457 | </p> | 7457 | </p> |
| | 7458 | <p> |
| | 7459 | If {#syntax#}T{#endsyntax#} is {#syntax#}comptime_int{#endsyntax#}, |
| | 7460 | then this is semantically equivalent to {#link|Type Coercion#}. |
| | 7461 | </p> |
| 7458 | {#header_close#} | 7462 | {#header_close#} |
| 7459 | | 7463 | |
| 7460 | {#header_open|@intToEnum#} | 7464 | {#header_open|@intToEnum#} |
| ... | @@ -8206,10 +8210,6 @@ test "integer truncation" { | ... | @@ -8206,10 +8210,6 @@ test "integer truncation" { |
| 8206 | This function always truncates the significant bits of the integer, regardless | 8210 | This function always truncates the significant bits of the integer, regardless |
| 8207 | of endianness on the target platform. | 8211 | of endianness on the target platform. |
| 8208 | </p> | 8212 | </p> |
| 8209 | <p> | | |
| 8210 | If {#syntax#}T{#endsyntax#} is {#syntax#}comptime_int{#endsyntax#}, | | |
| 8211 | then this is semantically equivalent to {#link|Type Coercion#}. | | |
| 8212 | </p> | | |
| 8213 | {#header_close#} | 8213 | {#header_close#} |
| 8214 | | 8214 | |
| 8215 | {#header_open|@Type#} | 8215 | {#header_open|@Type#} |