Closed
Description
All of these should be deduplicated under a common set of functions that do sign extension or truncation of integers.
The functions should live somewhere in librustc
, so probably librustc::mir::interpret
, because they are also needed in librustc::ty::layout
.
The parts that need to be figured out:
- what information is needed in each function (so we don't have to prepend all function calls with an "almost the same" computation of e.g. type layouts.
- are there many uses of sign extension followed by truncation and should these be a single function, too?
Metadata
Metadata
Assignees
Labels
Area: Constant evaluation, covers all const contexts (static, const fn, ...)Category: An issue proposing an enhancement or a PR with one.Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion.Relevant to the compiler team, which will review and decide on the PR/issue.