Rust-analyzer invalid config value message in VS Code

For some reason in the past day, every time I reload my VS Code window, Rust Analyzer is complaining:

I have tried:

  • Editing the setting (it's not null, everything appears normal),
  • Adding the setting to my user-level settings,
  • Switching to the "pre-release" version of rust-analyzer,
  • Completely deleting all my rust-analyzer settings, uninstall the extension, restart VS Code, and reinstall the extension,
  • Disabling all other extensions except rust-analyzer.

It does look look like rust-analyzer just had an update. And like I said: everything seemed like it was working earlier today.

~ Wolf

Rust Analyzer:
Identifier
rust-lang.rust-analyzer
Version
0.3.2431
Last Updated
2025-04-21, 00:19:01

VS Code:
Version: 1.99.3
Commit: 17baf841131aa23349f217ca7c570c76ee87b957
Date: 2025-04-15T23:18:46.076Z
Electron: 34.3.2
ElectronBuildId: 11161073
Chromium: 132.0.6834.210
Node.js: 20.18.3
V8: 13.2.152.41-electron.0
OS: Darwin arm64 24.4.0

Output from the CS Code extension output panel (long)

2025-04-21 00:48:52.988 [info] Extension version: 0.3.2431
2025-04-21 00:48:52.988 [info] Using configuration {
  restartServerOnConfigChange: false,
  showUnlinkedFileNotification: true,
  showRequestFailedErrorNotification: true,
  showDependenciesExplorer: true,
  showSyntaxTree: false,
  testExplorer: false,
  initializeStopped: false,
  runnables: {
    extraEnv: null,
    problemMatcher: [ '$rustc' ],
    askBeforeUpdateTest: true,
    command: null,
    extraArgs: [],
    extraTestBinaryArgs: [ '--show-output' ]
  },
  statusBar: {
    clickAction: 'openLogs',
    showStatusBar: {
      documentSelector: [
        { language: 'rust' },
        { pattern: '**/Cargo.toml' },
        { pattern: '**/Cargo.lock' },
        {
          scheme: 'output',
          pattern: 'extension-output-rust-lang.rust-analyzer*'
        }
      ]
    }
  },
  server: { path: null, extraEnv: null },
  trace: { server: 'off', extension: false },
  debug: {
    engine: 'auto',
    sourceFileMap: {
      '/rustc/<id>': '${env:USERPROFILE}/.rustup/toolchains/<toolchain-id>/lib/rustlib/src/rust'
    },
    buildBeforeRestart: false,
    engineSettings: {}
  },
  typing: { continueCommentsOnNewline: true, triggerChars: '=.' },
  diagnostics: {
    previewRustcOutput: false,
    useRustcErrorCode: false,
    disabled: [],
    enable: true,
    experimental: { enable: false },
    remapPrefix: {},
    styleLints: { enable: false },
    warningsAsHint: [],
    warningsAsInfo: []
  },
  assist: {
    emitMustUse: false,
    expressionFillDefault: 'todo',
    termSearch: { borrowcheck: true, fuel: 1800 }
  },
  cachePriming: { enable: true, numThreads: 'physical' },
  cargo: {
    allTargets: true,
    autoreload: true,
    buildScripts: {
      enable: true,
      invocationStrategy: 'per_workspace',
      overrideCommand: null,
      rebuildOnSave: true,
      useRustcWrapper: true
    },
    cfgs: [ 'debug_assertions', 'miri' ],
    extraArgs: [],
    extraEnv: {},
    features: [],
    noDefaultFeatures: false,
    noDeps: false,
    sysroot: 'discover',
    sysrootSrc: null,
    target: null,
    targetDir: null
  },
  cfg: { setTest: true },
  checkOnSave: true,
  check: {
    allTargets: null,
    command: 'check',
    extraArgs: [],
    extraEnv: {},
    features: null,
    ignore: [],
    invocationStrategy: 'per_workspace',
    noDefaultFeatures: null,
    overrideCommand: null,
    targets: null,
    workspace: true
  },
  completion: {
    addSemicolonToUnit: true,
    autoAwait: { enable: true },
    autoIter: { enable: true },
    autoimport: {
      enable: true,
      exclude: [
        { path: 'core::borrow::Borrow', type: 'methods' },
        { path: 'core::borrow::BorrowMut', type: 'methods' }
      ]
    },
    autoself: { enable: true },
    callable: { snippets: 'fill_arguments' },
    excludeTraits: [],
    fullFunctionSignatures: { enable: false },
    hideDeprecated: false,
    limit: null,
    postfix: { enable: true },
    privateEditable: { enable: false },
    snippets: {
      custom: {
        Ok: {
          postfix: 'ok',
          body: 'Ok(${receiver})',
          description: 'Wrap the expression in a `Result::Ok`',
          scope: 'expr'
        },
        'Box::pin': {
          postfix: 'pinbox',
          body: 'Box::pin(${receiver})',
          requires: 'std::boxed::Box',
          description: 'Put the expression into a pinned `Box`',
          scope: 'expr'
        },
        'Arc::new': {
          postfix: 'arc',
          body: 'Arc::new(${receiver})',
          requires: 'std::sync::Arc',
          description: 'Put the expression into an `Arc`',
          scope: 'expr'
        },
        Some: {
          postfix: 'some',
          body: 'Some(${receiver})',
          description: 'Wrap the expression in an `Option::Some`',
          scope: 'expr'
        },
        Err: {
          postfix: 'err',
          body: 'Err(${receiver})',
          description: 'Wrap the expression in a `Result::Err`',
          scope: 'expr'
        },
        'Rc::new': {
          postfix: 'rc',
          body: 'Rc::new(${receiver})',
          requires: 'std::rc::Rc',
          description: 'Put the expression into an `Rc`',
          scope: 'expr'
        }
      }
    },
    termSearch: { enable: false, fuel: 1000 }
  },
  files: { exclude: [], watcher: 'client' },
  highlightRelated: {
    breakPoints: { enable: true },
    closureCaptures: { enable: true },
    exitPoints: { enable: true },
    references: { enable: true },
    yieldPoints: { enable: true }
  },
  hover: {
    actions: {
      debug: { enable: true },
      enable: true,
      gotoTypeDef: { enable: true },
      implementations: { enable: true },
      references: { enable: false },
      run: { enable: true },
      updateTest: { enable: true }
    },
    documentation: { enable: true, keywords: { enable: true } },
    dropGlue: { enable: true },
    links: { enable: true },
    maxSubstitutionLength: 20,
    memoryLayout: {
      alignment: 'hexadecimal',
      enable: true,
      niches: false,
      offset: 'hexadecimal',
      size: 'both'
    },
    show: { enumVariants: 5, fields: 5, traitAssocItems: null }
  },
  imports: {
    granularity: { enforce: false, group: 'crate' },
    group: { enable: true },
    merge: { glob: true },
    preferNoStd: false,
    preferPrelude: false,
    prefix: 'plain',
    prefixExternPrelude: false
  },
  inlayHints: {
    bindingModeHints: { enable: false },
    chainingHints: { enable: true },
    closingBraceHints: { enable: true, minLines: 25 },
    closureCaptureHints: { enable: false },
    closureReturnTypeHints: { enable: 'never' },
    closureStyle: 'impl_fn',
    discriminantHints: { enable: 'never' },
    expressionAdjustmentHints: { enable: 'never', hideOutsideUnsafe: false, mode: 'prefix' },
    genericParameterHints: {
      const: { enable: true },
      lifetime: { enable: false },
      type: { enable: false }
    },
    implicitDrops: { enable: false },
    implicitSizedBoundHints: { enable: false },
    lifetimeElisionHints: { enable: 'never', useParameterNames: false },
    maxLength: 25,
    parameterHints: { enable: true },
    rangeExclusiveHints: { enable: false },
    reborrowHints: { enable: 'never' },
    renderColons: true,
    typeHints: {
      enable: true,
      hideClosureInitialization: false,
      hideClosureParameter: false,
      hideNamedConstructor: false
    }
  },
  interpret: { tests: false },
  joinLines: {
    joinAssignments: true,
    joinElseIf: true,
    removeTrailingComma: true,
    unwrapTrivialBlock: true
  },
  lens: {
    debug: { enable: true },
    enable: true,
    implementations: { enable: true },
    location: 'above_name',
    references: {
      adt: { enable: false },
      enumVariant: { enable: false },
      method: { enable: false },
      trait: { enable: false }
    },
    run: { enable: true },
    updateTest: { enable: true }
  },
  linkedProjects: [],
  lru: { capacity: null, query: { capacities: {} } },
  notifications: { cargoTomlNotFound: true },
  numThreads: null,
  procMacro: {
    attributes: { enable: true },
    enable: true,
    ignored: {},
    server: null
  },
  references: { excludeImports: false, excludeTests: false },
  rustc: { source: null },
  rustfmt: {
    extraArgs: [],
    overrideCommand: null,
    rangeFormatting: { enable: false }
  },
  semanticHighlighting: {
    doc: { comment: { inject: { enable: true } } },
    nonStandardTokens: true,
    operator: { enable: true, specialization: { enable: false } },
    punctuation: {
      enable: false,
      separate: { macro: { bang: false } },
      specialization: { enable: false }
    },
    strings: { enable: true }
  },
  signatureInfo: { detail: 'full', documentation: { enable: true } },
  vfs: { extraIncludes: [] },
  workspace: {
    discoverConfig: null,
    symbol: { search: { kind: 'only_types', limit: 128, scope: 'workspace' } }
  }
}

This forum isn't really the right place for RA bug reports. Looks like its bug tracker already has a (closed) issue about this:

1 Like

Thanks, and today's release does appear to fix the issue. However, the reason I came to the forum was due to the statement on the VS Code Extension page:

Communication

For usage and troubleshooting requests, please use the "IDEs and Editors" category of the Rust forum.

I wasn't assuming it was a bug, but definitely needed "troubleshooting", so that's why I posted here first. Someone might wish to clarify this.

1 Like

Oh, well maybe I'm just wrong then. I just haven't seen this sort of post here before. Would something like "if you suspect a bug, check the GitHub issues before posting" have helped you discover that issue I linked yourself?

Can confirm the new update fixes the issue, ran into the same thing last night.

2 Likes

Well, yeah. I try to follow the rules I'm given, and I'm quite used to being directed to GitHub issues. But in this case, that's not what it said. :+1: