File tree 2 files changed +25
-2
lines changed
2 files changed +25
-2
lines changed Original file line number Diff line number Diff line change 600
600
var lev_distance = MAX_LEV_DISTANCE + 1 ;
601
601
if ( obj . name === val . name ) {
602
602
if ( literalSearch === true ) {
603
- if ( val . generics . length !== 0 ) {
603
+ if ( val . generics && val . generics . length !== 0 ) {
604
604
if ( obj . generics && obj . length >= val . generics . length ) {
605
605
var elems = obj . generics . slice ( 0 ) ;
606
606
var allFound = true ;
637
637
}
638
638
// Names didn't match so let's check if one of the generic types could.
639
639
if ( literalSearch === true ) {
640
- if ( obj . generics . length > 0 ) {
640
+ if ( obj . generics && obj . generics . length > 0 ) {
641
641
for ( var x = 0 ; x < obj . generics . length ; ++ x ) {
642
642
if ( obj . generics [ x ] === val . name ) {
643
643
return true ;
Original file line number Diff line number Diff line change
1
+ // Copyright 2018 The Rust Project Developers. See the COPYRIGHT
2
+ // file at the top-level directory of this distribution and at
3
+ // http://rust-lang.org/COPYRIGHT.
4
+ //
5
+ // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6
+ // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7
+ // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8
+ // option. This file may not be copied, modified, or distributed
9
+ // except according to those terms.
10
+
11
+ const QUERY = '"error"' ;
12
+
13
+ const EXPECTED = {
14
+ 'others' : [
15
+ { 'path' : 'std' , 'name' : 'error' } ,
16
+ { 'path' : 'std::fmt' , 'name' : 'Error' } ,
17
+ { 'path' : 'std::io' , 'name' : 'Error' } ,
18
+ ] ,
19
+ 'in_args' : [ ] ,
20
+ 'returned' : [
21
+ { 'path' : 'std::fmt::LowerExp' , 'name' : 'fmt' } ,
22
+ ] ,
23
+ } ;
You can’t perform that action at this time.
0 commit comments