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

Flyimport picks different import than what it is showing for certain re-exports #13491

Open
Veykril opened this issue Oct 26, 2022 · 0 comments
Labels
A-completion autocompletion C-bug Category: bug

Comments

@Veykril
Copy link
Member

Veykril commented Oct 26, 2022

#[test]
fn qualified_reexport_flyimpot() {
    check_edit(
        "Display",
        r#"
//- /main.rs crate:main deps:std,core
impl fmt::Display$0 for () {}
//- /std.rs crate:std deps:alloc,core
pub use alloc::fmt;
//- /alloc.rs crate:alloc deps:core
pub mod fmt {
    pub use core::fmt::Display;
}
//- /core.rs crate:core
pub mod fmt {
    pub trait Display {}
}
"#,
        r#"
use std::fmt;

impl fmt::Display for () {}
"#,
    );
}

This test fails as it imports core::fmt instead of std::fmt.

@Veykril Veykril added A-completion autocompletion C-bug Category: bug labels Oct 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-completion autocompletion C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

1 participant