File tree Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Expand file tree Collapse file tree 2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1062
1062
type = matches [ 1 ] . replace ( / ^ c o n s t $ / , 'constant' ) ;
1063
1063
query = query . substring ( matches [ 0 ] . length ) ;
1064
1064
}
1065
+ // In case we just get a '!' as input, we can assume that the user is looking for the
1066
+ // `Never` primitive type.
1067
+ if ( raw === '!' ) {
1068
+ query = 'Never' ;
1069
+ }
1065
1070
1066
1071
return {
1067
1072
raw : raw ,
1369
1374
1370
1375
function search ( e ) {
1371
1376
var params = getQueryStringParams ( ) ;
1372
- var query = getQuery ( document . getElementsByClassName ( 'search-input' ) [ 0 ] . value ) ;
1377
+ var query = getQuery ( document . getElementsByClassName ( 'search-input' ) [ 0 ] . value . trim ( ) ) ;
1373
1378
1374
1379
if ( e ) {
1375
1380
e . preventDefault ( ) ;
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 = '!' ;
12
+
13
+ const EXPECTED = {
14
+ 'others' : [
15
+ { 'path' : 'std' , 'name' : 'never' } ,
16
+ ] ,
17
+ } ;
You can’t perform that action at this time.
0 commit comments