about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-01-26 14:43:32 +0100
committerGitHub <noreply@github.com>2024-01-26 14:43:32 +0100
commitb4b483574f8597ab40d4e4be6adb10a3a91174ec (patch)
tree930a676778f8291a4987665266c15bca9624bbd4 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
parent37b9022ceff4ee6d90ffcba513afe3324a964299 (diff)
parent2aa746913bda5c52b3efeefb756e13c72618f793 (diff)
downloadrust-b4b483574f8597ab40d4e4be6adb10a3a91174ec.tar.gz
rust-b4b483574f8597ab40d4e4be6adb10a3a91174ec.zip
Rollup merge of #120360 - compiler-errors:afit-sized-lol, r=lcnr
Don't fire `OPAQUE_HIDDEN_INFERRED_BOUND` on sized return of AFIT

Conceptually, we should probably not fire `OPAQUE_HIDDEN_INFERRED_BOUND` for methods like:

```
trait Foo { async fn bar() -> Self; }
```

Even though we technically cannot prove that `Self: Sized`, which is one of the item bounds of the `Output` type in the `-> impl Future<Output = Sized>` from the async desugaring.

This is somewhat justifiable along the same lines as how we allow regular methods to return `-> Self` even though `Self` isn't sized.

Fixes #113538

(side-note: some days i wonder if we should just remove the `OPAQUE_HIDDEN_INFERRED_BOUND` lint... it does make me sad that we have non-well-formed types in signatures, though.)
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
0 files changed, 0 insertions, 0 deletions