Skip to content

Issue 2263 fn subtyping - #3872

Closed
nikomatsakis wants to merge 2 commits into
rust-lang:incomingfrom
nikomatsakis:issue-2263-fn-subtyping
Closed

Issue 2263 fn subtyping#3872
nikomatsakis wants to merge 2 commits into
rust-lang:incomingfrom
nikomatsakis:issue-2263-fn-subtyping

Conversation

@nikomatsakis

Copy link
Copy Markdown
Contributor

Requires only that the impl method signature be a subtype of the trait method signature. Not a complete fix for #2263 but it's a step in the right direction.

U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
3872: fix cargo check config with custom command r=matklad a=JoshMcguigan

fixes rust-lang#3871

Previously if `get::<Vec<String>>(value, "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/checkOnSave/overrideCommand")` returned `Some` we'd never execute `set(value, "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/checkOnSave/command", command)`, even if the `overrideCommand` was empty. 

I am not sure of the best way to prove this, but I believe the LSP clients send this config with a default value if it is not set by the user, which means `get::<Vec<String>>(value, "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/checkOnSave/overrideCommand")` would return `Some(vec![])` and thus we'd never set the command to the user specified value (in the case of rust-lang#3871, "clippy").

I have tested this fix manually by installing this modified version of rust-analyzer and verifying I can see clippy lints in my editor (`coc.nvim`) with `rust-analyzer.checkOnSave.command": "clippy"`.

As best I can tell this would have affected rustfmt extra args too, so this PR also applies the same fix there.

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
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.

2 participants