Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tests for a few A-needstest issues #17199

Merged
merged 1 commit into from Sep 15, 2014
Merged

Add tests for a few A-needstest issues #17199

merged 1 commit into from Sep 15, 2014

Conversation

ghost
Copy link

@ghost ghost commented Sep 12, 2014

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.
@ghost
Copy link
Author

ghost commented Sep 15, 2014

@alexcrichton Hey, sorry about that, tidy issues. Can we try again?

@alexcrichton
Copy link
Member

We can indeed!

bors added a commit that referenced this pull request Sep 15, 2014
…hton

Closes #7813.
Closes #10902.
Closes #11374.
Closes #11714.
Closes #12920.
Closes #13202.
Closes #13624.
Closes #14039.
Closes #15730.
Closes #15783.
@bors bors closed this Sep 15, 2014
@bors bors merged commit 8a4ef62 into rust-lang:master Sep 15, 2014
@ghost ghost deleted the issues-that-need-tests branch September 15, 2014 21:51
lnicola pushed a commit to lnicola/rust that referenced this pull request Jul 11, 2024
Use proper `ImplTraits` in `insert_inference_vars_for_impl_trait`

Fixes rust-lang#17199 and fixes rust-lang#17403

In the previous implementation, I passed `rpits` as a function parameter and used `idx` of `ImplTraitId` for indexing `ImplTrait`.

https://github.com/rust-lang/rust-analyzer/blob/4e836c622a7bdab41be8e82733dd9fe40af128b2/crates/hir-ty/src/infer.rs#L881-L887

But that `idx` is rather a "local" one, so in the cases like mentioned issues, the async function that can be expanded roughly as

```rust
type TypeAlias = impl Something;
fn expanded_async() -> impl Future<Output = TypeAlias> { ... }
```

there are two bundles of `ImplTraits`; one for the `impl Future` and the other one for `TypeAlias`.
So using `idx` with `rpits` returns `ImplTrait` for `impl Future` even if we are asking for `TypeAlias` and this caused a stack overflow.

This PR is a fix for that implementation miss 😅
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment