Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion compiler/rustc_driver_impl/src/highlighter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ impl Highlighter {
// This heuristic test is to detect if the identifier is
// a function call. If it is, then the function identifier is
// colored differently.
if code[*len_accum..*len_accum + len + 1].ends_with('(') {
if code[*len_accum + len..].starts_with('(') {
style = style.fg_color(Some(Color::Ansi(FUNCTION_COLOR)));
}
// The `derive` keyword is colored differently.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//@ compile-flags: --explain E0602 --color always --error-format=human
//@ check-pass
// Ensure that we trigger the condition for #156326 without ICEing.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
An unknown or invalid lint was used on the command line.

Erroneous code example:

rustc -D bogus rust_file.rs

Maybe you just misspelled the lint name or the lint doesn't exist anymore. Either way, try to update/remove it in order to fix the error.
Loading