File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 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);
3636
3737/// Virtual crate for builtin macros
3838// 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 ) ;
4043
4144impl CrateNum {
4245 pub fn new ( x : usize ) -> CrateNum {
Original file line number Diff line number Diff line change @@ -494,7 +494,9 @@ impl Decodable for FileMap {
494494 name : name,
495495 name_was_remapped : name_was_remapped,
496496 // `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 ,
498500 start_pos : start_pos,
499501 end_pos : end_pos,
500502 src : None ,
You can’t perform that action at this time.
0 commit comments