about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm/src
diff options
context:
space:
mode:
authorJacob Pratt <jacob@jhpratt.dev>2024-06-27 02:06:19 -0400
committerGitHub <noreply@github.com>2024-06-27 02:06:19 -0400
commitd3debc0037f667752fb57f6224edeecb72cbd7d0 (patch)
tree8f8e9e73fb19ce56a1bdb9f46d096aeaa1a1e273 /compiler/rustc_codegen_llvm/src
parentb1f43974c40f9bbb570d77106c816b0bebfeb8c5 (diff)
parent9828e960ab4cccc9526fd6cc61df430588bd0487 (diff)
downloadrust-d3debc0037f667752fb57f6224edeecb72cbd7d0.tar.gz
rust-d3debc0037f667752fb57f6224edeecb72cbd7d0.zip
Rollup merge of #126929 - nnethercote:rm-__rust_force_expr, r=oli-obk
Remove `__rust_force_expr`.

This was added (with a different name) to improve an error message. It is no longer needed -- removing it changes the error message, but overall I think the new message is no worse:
- the mention of `#` in the first line is a little worse,
- but the extra context makes it very clear what the problem is, perhaps even clearer than the old message,
- and the removal of the note about the `expr` fragment (an internal detail of `__rust_force_expr`) is an improvement.

Overall I think the error is quite clear and still far better than the old message that prompted #61933, which didn't even mention patterns.

The motivation for this is #124141, which will cause pasted metavariables to be tokenized and reparsed instead of the AST node being cached. This change in behaviour occasionally has a non-zero perf cost, and `__rust_force_expr` causes the tokenize/reparse step to occur twice. Removing `__rust_force_expr` greatly reduces the extra overhead for the `deep-vector` benchmark.

r? ```@oli-obk```
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions