Skip to content

No definition found if you place an impl block inside a function #15805

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

Open
AndreySmirnov81 opened this issue Oct 26, 2023 · 1 comment
Open
Labels
C-bug Category: bug

Comments

@AndreySmirnov81
Copy link

изображение

struct T;

fn _bar() {
    impl T {
        pub fn foo() {
        }
    }
}

fn main() {
    T::foo();
}

rust-analyzer version: 0.3.1705-standalone (1087295 2023-10-22)
rustc 1.72.0 (5680fa18f 2023-08-23)

@AndreySmirnov81 AndreySmirnov81 added the C-bug Category: bug label Oct 26, 2023
@flodiebold
Copy link
Member

This will probably never be supported by rust-analyzer, as supporting it would mean having to check all function bodies for methods.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants