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

TAIT in async fn leads to stack overflow #17199

Open
indietyp opened this issue May 8, 2024 · 1 comment
Open

TAIT in async fn leads to stack overflow #17199

indietyp opened this issue May 8, 2024 · 1 comment
Assignees
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug I-crash

Comments

@indietyp
Copy link

indietyp commented May 8, 2024

using TAIT (type alias implement trait) in async function leads to a stack overflow. This is not the case for sync functions.

rust-analyzer version: rust-analyzer 1.80.0-nightly (faefc618 2024-05-07)

rustc version: rustc 1.80.0-nightly (faefc618c 2024-05-07)

editor or extension: using zed, but verified in the CLI

relevant settings: N/A

repository link: https://github.com/indietyp/rust-analyzer-regressions/tree/async-tait

code snippet to reproduce:

#![feature(type_alias_impl_trait)]

type Foo = impl std::fmt::Debug;

async fn foo() -> Foo {
    42
}

You can test this yourself using:

$ git clone git@github.com:indietyp/rust-analyzer-regressions.git && cd rust-analyzer-regressions && git switch async-tait
$ rustup run nightly-2024-05-08 rust-analyzer --version
$ rustup run nightly-2024-05-08 rust-analyzer analysis-stats .

the output of the commands has been posted in the README.md of the repository.

@indietyp indietyp added the C-bug Category: bug label May 8, 2024
@Veykril Veykril added I-crash A-ty type system / type inference / traits / method resolution labels May 9, 2024
@Kohei316
Copy link
Contributor

@rustbot claim

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ty type system / type inference / traits / method resolution C-bug Category: bug I-crash
Projects
None yet
Development

No branches or pull requests

3 participants