Commit 04ab648
Tweak type inference for
Previously these would be treated like integer literals and default to
`i32` if a type could not be determined. To allow for
forward-compatibility with `str` constants in the future, this PR
changes type inference to use an unbound type variable instead.
The actual type checking is deferred until after typeck where we still
ensure that the final type for the `const` operand is an integer type.const operands in inline asm1 parent a886938 commit 04ab648
File tree
2 files changed
+24
-9
lines changed- compiler
- rustc_hir_analysis/src/check
- rustc_hir_typeck/src
2 files changed
+24
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
455 | 455 | | |
456 | 456 | | |
457 | 457 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
462 | 478 | | |
463 | 479 | | |
464 | 480 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
265 | 265 | | |
266 | 266 | | |
267 | 267 | | |
268 | | - | |
269 | | - | |
270 | | - | |
271 | | - | |
272 | | - | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
273 | 272 | | |
274 | 273 | | |
275 | 274 | | |
| |||
0 commit comments