Skip to content

fix: reject unknown toolchain file keys#4953

Open
ychampion wants to merge 1 commit into
rust-lang:mainfrom
ychampion:fix/toolchain-file-unknown-keys
Open

fix: reject unknown toolchain file keys#4953
ychampion wants to merge 1 commit into
rust-lang:mainfrom
ychampion:fix/toolchain-file-unknown-keys

Conversation

@ychampion

Copy link
Copy Markdown
Contributor

Summary

  • reject unknown top-level and [toolchain] keys instead of silently ignoring them
  • document the rustup release that introduced each supported setting

Why

Misspelled or unsupported keys can otherwise leave rustup using a different toolchain configuration than the file appears to request.

Closes #2876

Validation

  • cargo test --features=test parse_toml_unknown --lib
  • cargo test --features=test --test test_bonanza rust_toolchain_toml
  • cargo clippy --all-targets --features=test -- -D warnings
  • cargo fmt --all -- --check
  • git diff --check

Constraint: Older rustup versions cannot safely interpret future toolchain-file semantics.\nRejected: Warn and continue | Maintainer direction requires a hard error.\nConfidence: high\nScope-risk: narrow\nDirective: Keep the documented key-version table current when extending the schema.\nTested: Focused parser and CLI tests; strict all-target Clippy with test feature; rustfmt; diff check.\nNot-tested: All-feature Clippy exceeded local disk while compiling vendored TLS backends.
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

Successfully merging this pull request may close these issues.

Unknown keys in rust-toolchain.toml are silently ignored

1 participant