-> CodeExtent {
if scope_a == scope_b { return scope_a; }
- /// [1] The initial values for `a_buf` and `b_buf` are not used.
- /// The `ancestors_of` function will return some prefix that
- /// is re-initialized with new values (or else fallback to a
- /// heap-allocated vector).
+ // [1] The initial values for `a_buf` and `b_buf` are not used.
+ // The `ancestors_of` function will return some prefix that
+ // is re-initialized with new values (or else fallback to a
+ // heap-allocated vector).
let mut a_buf: [CodeExtent; 32] = [scope_a /* [1] */; 32];
let mut a_vec: Vec<CodeExtent> = vec![];
let mut b_buf: [CodeExtent; 32] = [scope_b /* [1] */; 32];
tcx.item_path_str(tcx.hir.local_def_id(item.id)));
match item.node {
- /// Right now we check that every default trait implementation
- /// has an implementation of itself. Basically, a case like:
- ///
- /// `impl Trait for T {}`
- ///
- /// has a requirement of `T: Trait` which was required for default
- /// method implementations. Although this could be improved now that
- /// there's a better infrastructure in place for this, it's being left
- /// for a follow-up work.
- ///
- /// Since there's such a requirement, we need to check *just* positive
- /// implementations, otherwise things like:
- ///
- /// impl !Send for T {}
- ///
- /// won't be allowed unless there's an *explicit* implementation of `Send`
- /// for `T`
+ // Right now we check that every default trait implementation
+ // has an implementation of itself. Basically, a case like:
+ //
+ // `impl Trait for T {}`
+ //
+ // has a requirement of `T: Trait` which was required for default
+ // method implementations. Although this could be improved now that
+ // there's a better infrastructure in place for this, it's being left
+ // for a follow-up work.
+ //
+ // Since there's such a requirement, we need to check *just* positive
+ // implementations, otherwise things like:
+ //
+ // impl !Send for T {}
+ //
+ // won't be allowed unless there's an *explicit* implementation of `Send`
+ // for `T`
hir::ItemImpl(_, hir::ImplPolarity::Positive, _, _,
ref trait_ref, ref self_ty, _) => {
self.check_impl(item, self_ty, trait_ref);