Skip to content

"Missing trait item" but the item has a default value #15951

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

Closed
RalfJung opened this issue Nov 23, 2023 · 1 comment
Closed

"Missing trait item" but the item has a default value #15951

RalfJung opened this issue Nov 23, 2023 · 1 comment
Labels
C-bug Category: bug

Comments

@RalfJung
Copy link
Member

RalfJung commented Nov 23, 2023

To reproduce, check out Miri at commit f2f8b98bd12e4fd6ad1d9ec1a58b80216fab2ecb. Run ./miri toolchain to install a toolchain that can build Miri, then open Miri in RA. There's an error in src/machine.rs:

not all trait items implemented, missing: `const POST_MONO_CHECKS`

The error is wrong, since this constant has a default value.

rust-analyzer version: rust-analyzer version: 0.3.1740-standalone

rustc version: rustc 1.76.0-nightly (0ff861096 2023-11-21)

relevant settings:

// Place your settings in this file to overwrite default and user settings.
{
    "rust-analyzer.rustc.source": "discover",
    "rust-analyzer.linkedProjects": [
        "Cargo.toml",
        "cargo-miri/Cargo.toml",
        "miri-script/Cargo.toml",
    ],
    "rust-analyzer.check.overrideCommand": [
        "env",
        "MIRI_AUTO_OPS=no",
        "./miri",
        "cargo",
        "clippy",
        "--all-targets",
        "--message-format=json"
    ],
    // Contrary to what the name suggests, this also affects proc macros.
    "rust-analyzer.cargo.buildScripts.overrideCommand": [
        "env",
        "MIRI_AUTO_OPS=no",
        "./miri",
        "cargo",
        "check",
        "--message-format=json"
    ],
    //
    "rust-analyzer.showUnlinkedFileNotification": false,
}
@RalfJung RalfJung added the C-bug Category: bug label Nov 23, 2023
@lnicola
Copy link
Member

lnicola commented Nov 23, 2023

That's #15909, you can use the pre-release version to get a fix.

@lnicola lnicola closed this as completed Nov 23, 2023
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