Skip to content

Commit a697daf

Browse files
committed
---
yaml --- r: 174107 b: refs/heads/batch c: 2479dfc h: refs/heads/master i: 174105: 28de299 174103: 64698a7 v: v3
1 parent bfc38e5 commit a697daf

File tree

3 files changed

+23
-87
lines changed

3 files changed

+23
-87
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2929
refs/heads/issue-18208-method-dispatch-2: 9e1eae4fb9b6527315b4441cf8a0f5ca911d1671
3030
refs/heads/automation-fail: 1bf06495443584539b958873e04cc2f864ab10e4
3131
refs/heads/issue-18208-method-dispatch-3-quick-reject: 2009f85b9f99dedcec4404418eda9ddba90258a2
32-
refs/heads/batch: 2868404fcaed4030935ffafa87f5ea31ba4cd5bb
32+
refs/heads/batch: 2479dfcbf7abc401e5925bf5d53b7ac2e0eed694
3333
refs/heads/building: 126db549b038c84269a1e4fe46f051b2c15d6970
3434
refs/heads/beta: 44a287e6eb22ec3c2a687fc156813577464017f7
3535
refs/heads/windistfix: 7608dbad651f02e837ed05eef3d74a6662a6e928

branches/batch/src/librustc_trans/trans/debuginfo.rs

Lines changed: 22 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -323,28 +323,26 @@ impl<'tcx> TypeMap<'tcx> {
323323
fn get_unique_type_id_of_type<'a>(&mut self, cx: &CrateContext<'a, 'tcx>,
324324
type_: Ty<'tcx>) -> UniqueTypeId {
325325

326-
// basic type -> {:name of the type:}
327-
// tuple -> {tuple_(:param-uid:)*}
328-
// struct -> {struct_:svh: / :node-id:_<(:param-uid:),*> }
329-
// enum -> {enum_:svh: / :node-id:_<(:param-uid:),*> }
330-
// enum variant -> {variant_:variant-name:_:enum-uid:}
331-
// reference (&) -> {& :pointee-uid:}
332-
// mut reference (&mut) -> {&mut :pointee-uid:}
333-
// ptr (*) -> {* :pointee-uid:}
334-
// mut ptr (*mut) -> {*mut :pointee-uid:}
335-
// unique ptr (~) -> {~ :pointee-uid:}
336-
// @-ptr (@) -> {@ :pointee-uid:}
337-
// sized vec ([T; x]) -> {[:size:] :element-uid:}
338-
// unsized vec ([T]) -> {[] :element-uid:}
339-
// trait (T) -> {trait_:svh: / :node-id:_<(:param-uid:),*> }
340-
// closure -> {<unsafe_> <once_> :store-sigil:
341-
// |(:param-uid:),* <,_...>| -> \
342-
// :return-type-uid: : (:bounds:)*}
343-
// function -> {<unsafe_> <abi_> fn( (:param-uid:)* <,_...> ) -> \
344-
// :return-type-uid:}
345-
// unique vec box (~[]) -> {HEAP_VEC_BOX<:pointee-uid:>}
346-
// gc box -> {GC_BOX<:pointee-uid:>}
347-
// projection (<T as U>::V) -> {<:ty-uid: as :trait-uid:> :: :name-uid: }
326+
// basic type -> {:name of the type:}
327+
// tuple -> {tuple_(:param-uid:)*}
328+
// struct -> {struct_:svh: / :node-id:_<(:param-uid:),*> }
329+
// enum -> {enum_:svh: / :node-id:_<(:param-uid:),*> }
330+
// enum variant -> {variant_:variant-name:_:enum-uid:}
331+
// reference (&) -> {& :pointee-uid:}
332+
// mut reference (&mut) -> {&mut :pointee-uid:}
333+
// ptr (*) -> {* :pointee-uid:}
334+
// mut ptr (*mut) -> {*mut :pointee-uid:}
335+
// unique ptr (~) -> {~ :pointee-uid:}
336+
// @-ptr (@) -> {@ :pointee-uid:}
337+
// sized vec ([T; x]) -> {[:size:] :element-uid:}
338+
// unsized vec ([T]) -> {[] :element-uid:}
339+
// trait (T) -> {trait_:svh: / :node-id:_<(:param-uid:),*> }
340+
// closure -> {<unsafe_> <once_> :store-sigil: |(:param-uid:),* <,_...>| -> \
341+
// :return-type-uid: : (:bounds:)*}
342+
// function -> {<unsafe_> <abi_> fn( (:param-uid:)* <,_...> ) -> \
343+
// :return-type-uid:}
344+
// unique vec box (~[]) -> {HEAP_VEC_BOX<:pointee-uid:>}
345+
// gc box -> {GC_BOX<:pointee-uid:>}
348346

349347
match self.type_to_unique_id.get(&type_).cloned() {
350348
Some(unique_type_id) => return unique_type_id,
@@ -437,25 +435,6 @@ impl<'tcx> TypeMap<'tcx> {
437435
principal.substs,
438436
&mut unique_type_id);
439437
},
440-
ty::ty_projection(ref projection) => {
441-
unique_type_id.push_str("<");
442-
443-
let self_ty = projection.trait_ref.self_ty();
444-
let self_type_id = self.get_unique_type_id_of_type(cx, self_ty);
445-
let self_type_id = self.get_unique_type_id_as_string(self_type_id);
446-
unique_type_id.push_str(&self_type_id[]);
447-
448-
unique_type_id.push_str(" as ");
449-
450-
from_def_id_and_substs(self,
451-
cx,
452-
projection.trait_ref.def_id,
453-
projection.trait_ref.substs,
454-
&mut unique_type_id);
455-
456-
unique_type_id.push_str(">::");
457-
unique_type_id.push_str(token::get_name(projection.item_name).get());
458-
},
459438
ty::ty_bare_fn(_, &ty::BareFnTy{ unsafety, abi, ref sig } ) => {
460439
if unsafety == ast::Unsafety::Unsafe {
461440
unique_type_id.push_str("unsafe ");
@@ -499,10 +478,7 @@ impl<'tcx> TypeMap<'tcx> {
499478
closure_ty,
500479
&mut unique_type_id);
501480
},
502-
ty::ty_err |
503-
ty::ty_infer(_) |
504-
ty::ty_open(_) |
505-
ty::ty_param(_) => {
481+
_ => {
506482
cx.sess().bug(&format!("get_unique_type_id_of_type() - unexpected type: {}, {:?}",
507483
&ppaux::ty_to_string(cx.tcx(), type_)[],
508484
type_.sty)[])
@@ -3879,22 +3855,10 @@ fn push_debuginfo_type_name<'a, 'tcx>(cx: &CrateContext<'a, 'tcx>,
38793855
ty::ty_unboxed_closure(..) => {
38803856
output.push_str("closure");
38813857
}
3882-
ty::ty_projection(ref projection) => {
3883-
output.push_str("<");
3884-
let self_ty = projection.trait_ref.self_ty();
3885-
push_debuginfo_type_name(cx, self_ty, true, output);
3886-
3887-
output.push_str(" as ");
3888-
3889-
push_item_name(cx, projection.trait_ref.def_id, false, output);
3890-
push_type_params(cx, projection.trait_ref.substs, output);
3891-
3892-
output.push_str(">::");
3893-
output.push_str(token::get_name(projection.item_name).get());
3894-
}
38953858
ty::ty_err |
38963859
ty::ty_infer(_) |
38973860
ty::ty_open(_) |
3861+
ty::ty_projection(..) |
38983862
ty::ty_param(_) => {
38993863
cx.sess().bug(&format!("debuginfo: Trying to create type name for \
39003864
unexpected type: {}", ppaux::ty_to_string(cx.tcx(), t))[]);

branches/batch/src/test/debuginfo/associated_types.rs

Lines changed: 0 additions & 28 deletions
This file was deleted.

0 commit comments

Comments
 (0)