Skip to content

Commit 1c04fd8

Browse files
committed
---
yaml --- r: 175978 b: refs/heads/try c: 2479dfc h: refs/heads/master v: v3
1 parent 4591b02 commit 1c04fd8

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
@@ -2,7 +2,7 @@
22
refs/heads/master: a530cc9706324ad44dba464d541a807eb5afdb08
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: 777435990e0e91df6b72ce80c9b6fa485eeb5daa
5-
refs/heads/try: 2868404fcaed4030935ffafa87f5ea31ba4cd5bb
5+
refs/heads/try: 2479dfcbf7abc401e5925bf5d53b7ac2e0eed694
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/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/try/src/test/debuginfo/associated_types.rs

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

0 commit comments

Comments
 (0)