Change doc comment to code comment
This commit is contained in:
parent
7e70a63e61
commit
b68a03bded
@ -458,10 +458,10 @@ impl<'tcx> RegionMaps {
|
||||
-> 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];
|
||||
|
@ -89,23 +89,23 @@ impl<'a, 'gcx> CheckTypeWellFormedVisitor<'a, 'gcx> {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user