Change:
<!-- Thank you for finding an Internal Compiler Error! If possible, try to provide a minimal verifiable example. You can read "Rust Bug Minimization Patterns" for how to create smaller examples. --Simply building the rusty-xinput crate in the dependency chain seems to have triggered it. See <!-- If you're using the stable version of the compiler, you should also check if the bug also exists in the beta or nightly versions. --Rust version from the build <!-- Include a backtrace in the code block by setting in your environment. E.g. . --<details<summary<strongBacktrace</strong</summary<pI'm sorry - I don't have access to a windows environment to reproduce this! </p</details
I think is the cause, cc Note that you should set to reproduce it. I don't feel this is Windows-specific but it just depends on the Windows-specific crate, marking . <details<summary<strongBacktrace</strong</summary</details
MCVE: run on:
Assigning and removing .
I got the same error on Linux while compiling lazy_static. https://cirrus- .
This will be fixed by

Discussion:
for &(ref lint_name, level) in &sess.opts.lint_opts { store.check_lint_name_cmdline(sess, &lint_name, level); <ins> let orig_level = level; </ins> // If the cap is less than this specified level, e.g., if we've got // `--cap-lints allow` but we've also got `-D foo` then we ignore

}; for id in ids { self.check_gated_lint(id, DUMMY_SP); <del> let src = LintSource::CommandLine(lint_flag_val); </del> <ins> let src = LintSource::CommandLine(lint_flag_val, orig_level); </ins> specs.insert(id, (level, src)); } }

let forbidden_lint_name = match forbid_src { LintSource::Default => id.to_string(), LintSource::Node(name, _, _) => name.to_string(), <del> LintSource::CommandLine(name) => name.to_string(), </del> <ins> LintSource::CommandLine(name, _) => name.to_string(), </ins> }; let (lint_attr_name, lint_attr_span) = match *src { LintSource::Node(name, span, _) => (name, span),

diag_builder.note(&rationale.as_str()); } } <del> LintSource::CommandLine(_) => { </del> <ins> LintSource::CommandLine(_, _) => { </ins> diag_builder.note("`forbid` lint level was set on command line"); } }

Node(Symbol, Span, Option<Symbol> /* RFC 2383 reason */), /// Lint level was set by a command-line flag. <del> CommandLine(Symbol), </del> <ins> /// The provided `Level` is the level specified on the command line - /// the actual level may be lower due to `--cap-lints` CommandLine(Symbol, Level), </ins> } impl LintSource {

match *self { LintSource::Default => symbol::kw::Default, LintSource::Node(name, _, _) => name, <del> LintSource::CommandLine(name) => name, </del> <ins> LintSource::CommandLine(name, _) => name, </ins> } }

match *self { LintSource::Default => DUMMY_SP, LintSource::Node(_, span, _) => span, <del> LintSource::CommandLine(_) => DUMMY_SP, </del> <ins> LintSource::CommandLine(_, _) => DUMMY_SP, </ins> } } }

&format!("`#[{}({})]` on by default", level.as_str(), name), ); } <del> LintSource::CommandLine(lint_flag_val) => { let flag = match level { </del> <ins> LintSource::CommandLine(lint_flag_val, orig_level) => { let flag = match orig_level { </ins> Level::Warn => "-W", Level::Deny => "-D", Level::Forbid => "-F", <del> Level::Allow => panic!(), </del> <ins> Level::Allow => "-A", </ins> }; let hyphen_case_lint_name = name.replace("_", "-"); if lint_flag_val.as_str() == name {

<ins> // compile-flags: -D warnings --cap-lints allow // check-pass // Regression test for issue #78660 // Tests that we don't ICE when a future-incompat-report lint has // has a command-line source, but is capped to allow fn main() { ["hi"].into_iter(); } </ins>

<ins> Future incompatibility report: Future breakage date: None, diagnostic: warning: this method call currently resolves to `<&[T; N] as IntoIterator>::into_iter` (due to autoref coercions), but that might change in the future when `IntoIterator` impls for arrays are added. --> $DIR/issue-78660-cap-lints-future-compat.rs:9:12 | LL |     ["hi"].into_iter(); |            ^^^^^^^^^ help: use `.iter()` instead of `.into_iter()` to avoid ambiguity: `iter` | = note: `-D array-into-iter` implied by `-D warnings` = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #66145 <https://github.com/rust-lang/rust/issues/66145> </ins>