File tree Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Expand file tree Collapse file tree 2 files changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -3212,6 +3212,18 @@ impl<'a> Resolver<'a> {
3212
3212
let name = path[ path. len ( ) - 1 ] . node . name ;
3213
3213
// Make sure error reporting is deterministic.
3214
3214
names. sort_by_key ( |name| name. as_str ( ) ) ;
3215
+
3216
+
3217
+ // Ugly code, just to see if using case insensitive comparison will help
3218
+ let exact_match = names. iter ( ) . find ( |x| x. as_str ( ) . to_uppercase ( ) == name. as_str ( ) . to_uppercase ( ) ) ;
3219
+ // do not use Levenstein, just return the value we found (if any)
3220
+ if exact_match. is_some ( ) {
3221
+ return match exact_match {
3222
+ Some ( found) => Some ( found. clone ( ) ) ,
3223
+ _ => None ,
3224
+ }
3225
+ }
3226
+
3215
3227
match find_best_match_for_name ( names. iter ( ) , & name. as_str ( ) , None ) {
3216
3228
Some ( found) if found != name => Some ( found) ,
3217
3229
_ => None ,
Original file line number Diff line number Diff line change
1
+ // Original problem is Levenstein distance.
2
+
3
+ fn TyUint ( ) {
4
+ println ! ( "TyUint" ) ;
5
+ }
6
+
7
+ fn TyInt ( ) {
8
+ println ! ( "TyInt" ) ;
9
+ }
10
+
11
+
12
+ fn main ( ) {
13
+ TyUInt ( ) ;
14
+ }
You can’t perform that action at this time.
0 commit comments