File tree 2 files changed +7
-2
lines changed
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,10 @@ pub const LOCAL_CRATE: CrateNum = CrateNum(0);
36
36
37
37
/// Virtual crate for builtin macros
38
38
// FIXME(jseyfried): this is also used for custom derives until proc-macro crates get `CrateNum`s.
39
- pub const BUILTIN_MACROS_CRATE : CrateNum = CrateNum ( !0 ) ;
39
+ pub const BUILTIN_MACROS_CRATE : CrateNum = CrateNum ( u32:: MAX ) ;
40
+
41
+ /// A CrateNum value that indicates that something is wrong.
42
+ pub const INVALID_CRATE : CrateNum = CrateNum ( u32:: MAX - 1 ) ;
40
43
41
44
impl CrateNum {
42
45
pub fn new ( x : usize ) -> CrateNum {
Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ impl Decodable for FileMap {
494
494
name : name,
495
495
name_was_remapped : name_was_remapped,
496
496
// `crate_of_origin` has to be set by the importer.
497
- crate_of_origin : 0xEFFF_FFFF ,
497
+ // This value matches up with rustc::hir::def_id::INVALID_CRATE.
498
+ // That constant is not available here unfortunately :(
499
+ crate_of_origin : :: std:: u32:: MAX - 1 ,
498
500
start_pos : start_pos,
499
501
end_pos : end_pos,
500
502
src : None ,
You can’t perform that action at this time.
0 commit comments