Skip to content

Commit 49f5bb6

Browse files
committed
---
yaml --- r: 273125 b: refs/heads/beta c: 7003ed3 h: refs/heads/master i: 273123: b8ea4e5
1 parent b8961ac commit 49f5bb6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: 6992280f0003e825ad05daf6b5aed94c63e77773
26+
refs/heads/beta: 7003ed3fa75f714bd636392ad4c40968652f6320
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/src/librustdoc/clean/inline.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ pub fn build_impl(cx: &DocContext,
320320
let type_scheme = tcx.lookup_item_type(did);
321321
let default = if assoc_const.has_value {
322322
Some(const_eval::lookup_const_by_id(tcx, did, None, None)
323-
.unwrap().span.to_src(cx))
323+
.unwrap().0.span.to_src(cx))
324324
} else {
325325
None
326326
};
@@ -462,15 +462,15 @@ fn build_const(cx: &DocContext, tcx: &TyCtxt,
462462
use rustc::middle::const_eval;
463463
use rustc_front::print::pprust;
464464

465-
let expr = const_eval::lookup_const_by_id(tcx, did, None, None).unwrap_or_else(|| {
465+
let (expr, ty) = const_eval::lookup_const_by_id(tcx, did, None, None).unwrap_or_else(|| {
466466
panic!("expected lookup_const_by_id to succeed for {:?}", did);
467467
});
468468
debug!("converting constant expr {:?} to snippet", expr);
469469
let sn = pprust::expr_to_string(expr);
470470
debug!("got snippet {}", sn);
471471

472472
clean::Constant {
473-
type_: tcx.lookup_item_type(did).ty.clean(cx),
473+
type_: ty.map(|t| t.clean(cx)).unwrap_or_else(|| tcx.lookup_item_type(did).ty.clean(cx)),
474474
expr: sn
475475
}
476476
}

0 commit comments

Comments
 (0)