]> git.lizzy.rs Git - rust.git/commit - src/tools/miri
Rollup merge of #83916 - Amanieu:asm_anonconst, r=petrochenkov
authorDylan DPC <dylan.dpc@gmail.com>
Wed, 7 Apr 2021 11:07:14 +0000 (13:07 +0200)
committerGitHub <noreply@github.com>
Wed, 7 Apr 2021 11:07:14 +0000 (13:07 +0200)
commitb81c6cdb570957b5d6d4261b908f7e0364a67d81
tree17747b2dc011502d4905a95c80e921c85fc5e05e
parent4d5bb1ca222143627674a0da99c5b3f7bd7be77d
parent32be124e306e537590cedcb56e6c16db7f9d8ce7
Rollup merge of #83916 - Amanieu:asm_anonconst, r=petrochenkov

Use AnonConst for asm! constants

This replaces the old system which used explicit promotion. See #83169 for more background.

The syntax for `const` operands is still the same as before: `const <expr>`.

Fixes #83169

Because the implementation is heavily based on inline consts, we suffer from the same issues:
- We lose the ability to use expressions derived from generics. See the deleted tests in `src/test/ui/asm/const.rs`.
- We are hitting the same ICEs as inline consts, for example #78174. It is unlikely that we will be able to stabilize this before inline consts are stabilized.
compiler/rustc_ast_lowering/src/expr.rs
compiler/rustc_middle/src/mir/mod.rs
compiler/rustc_middle/src/mir/visit.rs
compiler/rustc_mir/src/borrow_check/invalidation.rs
compiler/rustc_mir/src/borrow_check/mod.rs
compiler/rustc_mir/src/dataflow/move_paths/builder.rs
compiler/rustc_mir_build/src/build/expr/into.rs
compiler/rustc_typeck/src/check/expr.rs
compiler/rustc_typeck/src/expr_use_visitor.rs