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
commit 921fc87ae8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 1 deletions

View File

@ -597,7 +597,8 @@ impl Ord for UseSegment {
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) {

View File

@ -98,3 +98,6 @@ use c;
// #2670
#[macro_use]
use imports_with_attr;
// #2888
use std::f64::consts::{SQRT_2, E, PI};

View File

@ -120,3 +120,6 @@ use c;
// #2670
#[macro_use]
use imports_with_attr;
// #2888
use std::f64::consts::{E, PI, SQRT_2};