about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-08-19 14:17:07 +0000
committerbors <bors@rust-lang.org>2024-08-19 14:17:07 +0000
commitf9c0c8a7794b9a9679a82e95a8af67ba62948582 (patch)
treee9bc4cb2edf275aade3284ddd1f7e578033c2eff /tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs
parentf17e9a0ffcc6e90058081a185bc45ef3a558a6b7 (diff)
parentea12d79b3aaf025425b6a3043f38dc7454eda252 (diff)
downloadrust-f9c0c8a7794b9a9679a82e95a8af67ba62948582.tar.gz
rust-f9c0c8a7794b9a9679a82e95a8af67ba62948582.zip
Auto merge of #17924 - ShoyuVanilla:issue-17921, r=Veykril
fix: Panic when a TAIT exists in a RPIT

Fixes  #17921

When there is a TAIT inside of a RPIT like;

```rust
trait Foo {}
type Bar = impl Foo;
fn foo<A>() -> impl Future<Output = Bar> { .. }
```

while inferencing `fn foo`, `insert_inference_vars_for_impl_trait` tries to substitute impl trait bounds of `Bar`, i.e. `Implemented(Foo)` with RPITs `placeholders`, and this causes panic

https://github.com/rust-lang/rust-analyzer/blob/fa003262474185fd62168379500fe906b331824b/crates/hir-ty/src/infer.rs#L903-L905
Diffstat (limited to 'tests/codegen/patchable-function-entry/patchable-function-entry-no-flag.rs')
0 files changed, 0 insertions, 0 deletions