Skip to content

Commit bfb13ec

Browse files
authored
Rollup merge of #96390 - GuillaumeGomez:es6-part2, r=notriddle
Switch JS code to ES6 - part 2 Part of #93058. It's based on #96361 so it needs to wait for it to be merged first. r? `@notriddle`
2 parents 1c8966e + 4e0be6d commit bfb13ec

File tree

7 files changed

+233
-245
lines changed

7 files changed

+233
-245
lines changed

src/librustdoc/html/static/js/externs.js

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
// This file contains type definitions that are processed by the Closure Compiler but are
22
// not put into the JavaScript we include as part of the documentation. It is used for
33
// type checking. See README.md in this directory for more info.
4+
/* eslint-env es6 */
5+
/* eslint no-var: "error" */
6+
/* eslint prefer-const: "error" */
47

58
/* eslint-disable */
6-
var searchState;
9+
let searchState;
710
function initSearch(searchIndex){}
811

912
/**
@@ -15,7 +18,7 @@ function initSearch(searchIndex){}
1518
* generics: Array<QueryElement>,
1619
* }}
1720
*/
18-
var QueryElement;
21+
let QueryElement;
1922

2023
/**
2124
* @typedef {{
@@ -25,7 +28,7 @@ var QueryElement;
2528
* userQuery: string,
2629
* }}
2730
*/
28-
var ParserState;
31+
let ParserState;
2932

3033
/**
3134
* @typedef {{
@@ -38,7 +41,7 @@ var ParserState;
3841
* foundElems: number,
3942
* }}
4043
*/
41-
var ParsedQuery;
44+
let ParsedQuery;
4245

4346
/**
4447
* @typedef {{
@@ -53,7 +56,7 @@ var ParsedQuery;
5356
* type: (Array<?>|null)
5457
* }}
5558
*/
56-
var Row;
59+
let Row;
5760

5861
/**
5962
* @typedef {{
@@ -63,7 +66,7 @@ var Row;
6366
* query: ParsedQuery,
6467
* }}
6568
*/
66-
var ResultsTable;
69+
let ResultsTable;
6770

6871
/**
6972
* @typedef {{
@@ -80,4 +83,4 @@ var ResultsTable;
8083
* ty: number,
8184
* }}
8285
*/
83-
var Results;
86+
let Results;

0 commit comments

Comments
 (0)