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