Skip to content

Commit dc30520

Browse files
committed
---
yaml --- r: 180200 b: refs/heads/tmp c: e5ff1d6fe7b8dd01efadeaddc0f3408e194562ee h: refs/heads/master v: v3
1 parent f2def3f commit dc30520

File tree

6 files changed

+455
-141
lines changed

6 files changed

+455
-141
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928
3636
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
37-
refs/heads/tmp: 4ef4ddd757f93fee4e5bf8aafd3e9233ea9df034
37+
refs/heads/tmp: e5ff1d6fe7b8dd01efadeaddc0f3408e194562ee

branches/tmp/src/librustc/diagnostics.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ register_diagnostics! {
5959
E0010,
6060
E0011,
6161
E0012,
62+
E0013,
6263
E0014,
6364
E0015,
6465
E0016,

branches/tmp/src/librustc/metadata/common.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ pub enum astencode_tag { // Reserves 0x40 -- 0x5f
143143
tag_table_upvar_capture_map = 0x56,
144144
tag_table_capture_modes = 0x57,
145145
tag_table_object_cast_map = 0x58,
146+
tag_table_const_qualif = 0x59,
146147
}
147148

148149
pub const tag_item_trait_item_sort: uint = 0x60;

branches/tmp/src/librustc/middle/astencode.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ use metadata::tydecode;
2323
use metadata::tydecode::{DefIdSource, NominalType, TypeWithId, TypeParameter};
2424
use metadata::tydecode::{RegionParameter, ClosureSource};
2525
use metadata::tyencode;
26+
use middle::check_const::ConstQualif;
2627
use middle::mem_categorization::Typer;
2728
use middle::subst;
2829
use middle::subst::VecPerParamSpace;
@@ -1311,6 +1312,15 @@ fn encode_side_tables_for_id(ecx: &e::EncodeContext,
13111312
})
13121313
})
13131314
}
1315+
1316+
for &qualif in tcx.const_qualif_map.borrow().get(&id).iter() {
1317+
rbml_w.tag(c::tag_table_const_qualif, |rbml_w| {
1318+
rbml_w.id(id);
1319+
rbml_w.tag(c::tag_table_val, |rbml_w| {
1320+
qualif.encode(rbml_w).unwrap()
1321+
})
1322+
})
1323+
}
13141324
}
13151325

13161326
trait doc_decoder_helpers {
@@ -1931,6 +1941,10 @@ fn decode_side_tables(dcx: &DecodeContext,
19311941
dcx.tcx.closure_kinds.borrow_mut().insert(ast_util::local_def(id),
19321942
closure_kind);
19331943
}
1944+
c::tag_table_const_qualif => {
1945+
let qualif: ConstQualif = Decodable::decode(val_dsr).unwrap();
1946+
dcx.tcx.const_qualif_map.borrow_mut().insert(id, qualif);
1947+
}
19341948
_ => {
19351949
dcx.tcx.sess.bug(
19361950
&format!("unknown tag found in side tables: {:x}",

0 commit comments

Comments
 (0)