This repository was archived by the owner on Mar 1, 2019. It is now read-only.
File tree 2 files changed +4
-3
lines changed 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change 6
6
// option. This file may not be copied, modified, or distributed
7
7
// except according to those terms.
8
8
9
- #![ feature( const_fn) ]
10
9
#![ feature( type_ascription) ]
11
10
12
11
#[ macro_use]
@@ -35,6 +34,7 @@ use std::collections::HashMap;
35
34
use std:: path:: { Path , PathBuf } ;
36
35
use std:: sync:: Mutex ;
37
36
use std:: time:: { Instant , SystemTime } ;
37
+ use std:: u64;
38
38
39
39
#[ derive( Debug ) ]
40
40
pub struct AnalysisHost < L : AnalysisLoader = CargoAnalysisLoader > {
@@ -76,7 +76,7 @@ pub type Span = span::Span<span::ZeroIndexed>;
76
76
pub struct Id ( u64 ) ;
77
77
78
78
// Used to indicate a missing index in the Id.
79
- pub const NULL : Id = Id ( u64:: max_value ( ) ) ;
79
+ pub const NULL : Id = Id ( u64:: MAX ) ;
80
80
81
81
type Blacklist < ' a > = & ' a [ & ' static str ] ;
82
82
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ use std::collections::HashMap;
21
21
use std:: iter:: Extend ;
22
22
use std:: path:: { Path , PathBuf } ;
23
23
use std:: time:: Instant ;
24
+ use std:: u32;
24
25
25
26
// f is a function used to record the lowered crate into analysis.
26
27
pub fn lower < F , L > (
@@ -336,7 +337,7 @@ impl CrateReader {
336
337
// }
337
338
338
339
fn id_from_compiler_id ( & self , id : & data:: Id ) -> Id {
339
- if id. krate == u32:: max_value ( ) || id. index == u32:: max_value ( ) {
340
+ if id. krate == u32:: MAX || id. index == u32:: MAX {
340
341
return NULL ;
341
342
}
342
343
// We build an id by looking up the local crate number into a global crate number and using
You can’t perform that action at this time.
0 commit comments