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

no such field error when using include_dir #15996

Closed
kryptan opened this issue Dec 1, 2023 · 1 comment
Closed

no such field error when using include_dir #15996

kryptan opened this issue Dec 1, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@kryptan
Copy link

kryptan commented Dec 1, 2023

main.rs:

use include_dir::include_dir;
use std::fs::File;

fn main() {
    include_dir!("src");
}

Full code.

image

Rust Analyzer shows error while rustc compiles the same code without errors.


rust-analyzer version: 0.3.1748-standalone (237712f 2023-11-26)

rustc version: rustc 1.76.0-nightly (f5dc2653f 2023-11-25)

@kryptan kryptan added the C-bug Category: bug label Dec 1, 2023
@Young-Flash
Copy link
Member

Young-Flash commented Dec 1, 2023

It works well for me with the same version R-A after delete use std::fs::File;

upgrade include_dir to latest version also solve the problem

@lnicola lnicola closed this as completed Jan 12, 2025
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

3 participants