Merge pull request #2889 from topecongiro/issue-2888

Handle imports with items whose name contains digits
This commit is contained in:
Nick Cameron
2018-08-04 11:26:09 +12:00
committed by GitHub
3 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -597,7 +597,8 @@ fn cmp(&self, other: &UseSegment) -> Ordering {
use self::UseSegment::*;
fn is_upper_snake_case(s: &str) -> bool {
s.chars().all(|c| c.is_uppercase() || c == '_')
s.chars()
.all(|c| c.is_uppercase() || c == '_' || c.is_numeric())
}
match (self, other) {
+3
View File
@@ -98,3 +98,6 @@ fn test() {
// #2670
#[macro_use]
use imports_with_attr;
// #2888
use std::f64::consts::{SQRT_2, E, PI};
+3
View File
@@ -120,3 +120,6 @@ fn test() {
// #2670
#[macro_use]
use imports_with_attr;
// #2888
use std::f64::consts::{E, PI, SQRT_2};