about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
diff options
context:
space:
mode:
authorTomasz Miąsko <tomasz.miasko@gmail.com>2023-04-30 00:00:00 +0000
committerTomasz Miąsko <tomasz.miasko@gmail.com>2023-04-30 23:57:47 +0200
commitc678acd3a275c9acd34c2ecfa9b7b06e2ca7874f (patch)
tree9b805f07e2303b061cedf59f879a57704e2cfd7f /compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp
parentf2eb9f85b9b52e6538c3c7fc160725963272d471 (diff)
downloadrust-c678acd3a275c9acd34c2ecfa9b7b06e2ca7874f.tar.gz
rust-c678acd3a275c9acd34c2ecfa9b7b06e2ca7874f.zip
Leave promoteds untainted by errors when borrowck fails
Previously, when borrowck failed it would taint all promoteds within the MIR
body. An attempt to evaluated the promoteds would subsequently fail with
spurious "note: erroneous constant used". For example:

```console
...
note: erroneous constant used
 --> tests/ui/borrowck/tainted-promoteds.rs:7:9
  |
7 |     a = &0 * &1 * &2 * &3;
  |         ^^

note: erroneous constant used
 --> tests/ui/borrowck/tainted-promoteds.rs:7:14
  |
7 |     a = &0 * &1 * &2 * &3;
  |              ^^

note: erroneous constant used
 --> tests/ui/borrowck/tainted-promoteds.rs:7:19
  |
7 |     a = &0 * &1 * &2 * &3;
  |                   ^^

note: erroneous constant used
 --> tests/ui/borrowck/tainted-promoteds.rs:7:24
  |
7 |     a = &0 * &1 * &2 * &3;
  |                        ^^
```

Borrowck failure doesn't indicate that there is anything wrong with
promoteds. Leave them untainted.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/ArchiveWrapper.cpp')
0 files changed, 0 insertions, 0 deletions