Skip to content
This repository was archived by the owner on Nov 18, 2022. It is now read-only.
This repository was archived by the owner on Nov 18, 2022. It is now read-only.

Unresolved import error highlighting when nothing is wrong #513

Open
@tuvtran

Description

@tuvtran

I was following chapter 12.3 of the Rust book [0]. Particularly this snippet from Listing 12-14:

use std::env;
use std::process;

use minigrep;
use minigrep::Config;

fn main() {
    // --snip--
    if let Err(e) = minigrep::run(config) {
        // --snip--
    }
}

However, the VS Code extension threw me some errors:
screen shot 2019-02-25 at 3 51 59 pm

Upon digging this issue, I found out that prior to the 2018 Edition, the Rust compiler would have caught these issues [1]. After updating Rust to 1.32.0 and adding edition = "2018" to Cargo.toml, my code ran just fine in the terminal. Yet, these errors still persist inside VS Code via the Rust extension. Is it just me or the extension never fixes this error?

[0] https://doc.rust-lang.org/book/ch12-03-improving-error-handling-and-modularity.html
[1] rust-lang/book#1676 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugrlsIssue related to the RLS itself rather than the extension

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions