about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-08-31 08:28:12 +0000
committerbors <bors@rust-lang.org>2022-08-31 08:28:12 +0000
commit56d888689b7f58094ee5b082eaf94a0b8179ff32 (patch)
tree97c2b6a7b1f5d4b6a06ec863645d0aa208f94862 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp
parentb6138965cdfc2d6b9b32fe0cc5cef9482975dc94 (diff)
parent7ecead23c82f783665aa0bdb2f9ff6d26de545e9 (diff)
downloadrust-56d888689b7f58094ee5b082eaf94a0b8179ff32.tar.gz
rust-56d888689b7f58094ee5b082eaf94a0b8179ff32.zip
Auto merge of #12793 - lowr:fix/12739, r=Veykril
fix: sort and deduplicate auto traits in trait object types

Fixes #12739

Chalk solver doesn't sort and deduplicate auto traits in trait object types, so we need to handle them ourselves in the lowering phase, just like [`rustc`](https://github.com/rust-lang/rust/blob/880416180b0a9ee1141c07d4d17667edb77daebd/compiler/rustc_typeck/src/astconv/mod.rs#L1487-L1488) and [`chalk-integration`](https://github.com/rust-lang/chalk/blob/master/chalk-integration/src/lowering.rs#L575) do.

Quoting from [the Chalk book](https://rust-lang.github.io/chalk/book/types/rust_types.html#dyn-types):

> Note that -- for this purpose -- ordering of bounds is significant. That means that if you create a `dyn Foo + Send` and a `dyn Send + Foo`, chalk would consider them distinct types. The assumption is that bounds are ordered in some canonical fashion somewhere else.

Also, trait object types with more than one non-auto traits were previously allowed, but are now disallowed with this patch.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions