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

TryFrom/TryInto are not resolved from the prelude in 2021 edition #13250

Closed
Veetaha opened this issue Sep 18, 2022 · 2 comments
Closed

TryFrom/TryInto are not resolved from the prelude in 2021 edition #13250

Veetaha opened this issue Sep 18, 2022 · 2 comments

Comments

@Veetaha
Copy link
Contributor

Veetaha commented Sep 18, 2022

Reproduction

  1. Run cargo new repro, assuming cargo sets edition = "2021" in Cargo.toml.
  2. Put this code into main.rs:
    fn main() {
        let _: bool = TryFrom::try_from(true).unwrap();
        let _: bool = true.try_into().unwrap();
    }
  3. Hover over TryFrom::try_from and try_into symbols and observe them as unresolved according to rust-analyzer: image

rust-analyzer version: rust-analyzer version: 0.3.1203-standalone
rustc version: rustc 1.63.0 (4b91a6ea7 2022-08-08)

@lnicola
Copy link
Member

lnicola commented Sep 18, 2022

Fixed in #13235 or another recent PR:

image

@lnicola lnicola closed this as completed Sep 18, 2022
@lnicola
Copy link
Member

lnicola commented Sep 19, 2022

Sorry, that was probably #13147.

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

No branches or pull requests

2 participants