// determine if we should display the inner contents or
// the outer `mod` item for the source code.
- let whence = {
+ let span = {
let sm = cx.sess().source_map();
let outer = sm.lookup_char_pos(self.where_outer.lo());
let inner = sm.lookup_char_pos(self.where_inner.lo());
Item {
name: Some(name),
attrs,
- source: whence.clean(cx),
+ source: span.clean(cx),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
deprecation: cx.deprecation(self.id).clean(cx),
let mut where_predicates =
where_predicates.into_iter().flat_map(|p| p.clean(cx)).collect::<Vec<_>>();
- // Type parameters and have a Sized bound by default unless removed with
+ // Type parameters have a Sized bound by default unless removed with
// ?Sized. Scan through the predicates and mark any type parameter with
// a Sized bound, removing the bounds as we find them.
//
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
deprecation: cx.deprecation(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs,
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs,
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
visibility: Inherited,
stability: cx.stability(self.id).clean(cx),
deprecation: cx.deprecation(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: def_id.to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
let make_item = |trait_: Option<Type>, for_: Type, items: Vec<Item>| Item {
name: None,
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: def_id.to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
vec![Item {
name: None,
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: DefId { krate: self.cnum, index: CRATE_DEF_INDEX },
visibility: self.vis.clean(cx),
stability: None,
vec![Item {
name: None,
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: DefId::local(CRATE_DEF_INDEX),
visibility: self.vis.clean(cx),
stability: None,
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
def_id: cx.tcx.hir().local_def_id(self.id).to_def_id(),
visibility: self.vis.clean(cx),
stability: cx.stability(self.id).clean(cx),
Item {
name: Some(name.clone()),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
visibility: Public,
stability: cx.stability(self.hid).clean(cx),
deprecation: cx.deprecation(self.hid).clean(cx),
Item {
name: Some(self.name.clean(cx)),
attrs: self.attrs.clean(cx),
- source: self.whence.clean(cx),
+ source: self.span.clean(cx),
visibility: Public,
stability: cx.stability(self.id).clean(cx),
deprecation: cx.deprecation(self.id).clean(cx),