about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-04-06 09:32:51 +0000
committerbors <bors@rust-lang.org>2022-04-06 09:32:51 +0000
commitcf1e2e9c1c4ba20127f81135f413c50658c9a85f (patch)
tree8da74d4537c3c813a58bd939687c3f89aef11261 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent880ff2497d723bc8bf64a7304c0011bc25bef5b0 (diff)
parent41ef4f729f3df237918229ff960c84792dd3231d (diff)
downloadrust-cf1e2e9c1c4ba20127f81135f413c50658c9a85f.tar.gz
rust-cf1e2e9c1c4ba20127f81135f413c50658c9a85f.zip
Auto merge of #8612 - SabrinaJewson:suggest-from-utf8-unchecked-in-const, r=flip1995
Suggest from_utf8_unchecked in const contexts

Unfortunately I couldn't figure out how to check whether a given expression is in an `unsafe` context or not, so I just unconditionally emit the wrapping `unsafe {}` block in the suggestion. If there is an easy way to get it to work better then I would love to hear it.

changelog: Suggest `from_utf8_unchecked` instead of `from_utf8` in const contexts for ``[`transmute_bytes_to_str`]``

refs: #8379
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions