mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 05:45:12 +00:00
Fix ambiguity with CamelCase diagnostic messages
This commit is contained in:
parent
546339a7be
commit
60219d0b11
4 changed files with 21 additions and 21 deletions
|
@ -614,7 +614,7 @@ fn path_segment_cmp(a: &ast::PathSegment, b: &ast::PathSegment) -> Ordering {
|
|||
(Some(_), None) => Ordering::Greater,
|
||||
(None, Some(_)) => Ordering::Less,
|
||||
(Some(a_name), Some(b_name)) => {
|
||||
// snake_case < CamelCase < UPPER_SNAKE_CASE
|
||||
// snake_case < UpperCamelCase < UPPER_SNAKE_CASE
|
||||
let a_text = a_name.as_str().trim_start_matches("r#");
|
||||
let b_text = b_name.as_str().trim_start_matches("r#");
|
||||
if a_text.starts_with(char::is_lowercase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue