clone less
This commit is contained in:
parent
49112241e9
commit
1ba97cb1cc
4 changed files with 76 additions and 82 deletions
|
@ -880,7 +880,7 @@ impl<'a, 'tcx> Visitor<'tcx> for BoundVarContext<'a, 'tcx> {
|
||||||
(pair, r)
|
(pair, r)
|
||||||
})
|
})
|
||||||
.unzip();
|
.unzip();
|
||||||
self.record_late_bound_vars(hir_id, binders.clone());
|
self.record_late_bound_vars(hir_id, binders);
|
||||||
// Even if there are no lifetimes defined here, we still wrap it in a binder
|
// Even if there are no lifetimes defined here, we still wrap it in a binder
|
||||||
// scope. If there happens to be a nested poly trait ref (an error), that
|
// scope. If there happens to be a nested poly trait ref (an error), that
|
||||||
// will be `Concatenating` anyways, so we don't have to worry about the depth
|
// will be `Concatenating` anyways, so we don't have to worry about the depth
|
||||||
|
|
|
@ -856,7 +856,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
|
|
||||||
PatKind::InlineConstant { ref subpattern, .. } => {
|
PatKind::InlineConstant { ref subpattern, .. } => {
|
||||||
self.visit_primary_bindings(subpattern, pattern_user_ty.clone(), f)
|
self.visit_primary_bindings(subpattern, pattern_user_ty, f)
|
||||||
}
|
}
|
||||||
|
|
||||||
PatKind::Leaf { ref subpatterns } => {
|
PatKind::Leaf { ref subpatterns } => {
|
||||||
|
|
|
@ -1750,7 +1750,7 @@ pub(crate) fn markdown_links<'md, R>(
|
||||||
}
|
}
|
||||||
// do not actually include braces in the span
|
// do not actually include braces in the span
|
||||||
let range = (open_brace + 1)..close_brace;
|
let range = (open_brace + 1)..close_brace;
|
||||||
MarkdownLinkRange::Destination(range.clone())
|
MarkdownLinkRange::Destination(range)
|
||||||
};
|
};
|
||||||
|
|
||||||
let span_for_offset_forward = |span: Range<usize>, open: u8, close: u8| {
|
let span_for_offset_forward = |span: Range<usize>, open: u8, close: u8| {
|
||||||
|
@ -1786,7 +1786,7 @@ pub(crate) fn markdown_links<'md, R>(
|
||||||
}
|
}
|
||||||
// do not actually include braces in the span
|
// do not actually include braces in the span
|
||||||
let range = (open_brace + 1)..close_brace;
|
let range = (open_brace + 1)..close_brace;
|
||||||
MarkdownLinkRange::Destination(range.clone())
|
MarkdownLinkRange::Destination(range)
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut broken_link_callback = |link: BrokenLink<'md>| Some((link.reference, "".into()));
|
let mut broken_link_callback = |link: BrokenLink<'md>| Some((link.reference, "".into()));
|
||||||
|
|
|
@ -25,12 +25,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) {
|
||||||
Some(sp) => sp,
|
Some(sp) => sp,
|
||||||
None => item.attr_span(tcx),
|
None => item.attr_span(tcx),
|
||||||
};
|
};
|
||||||
tcx.struct_span_lint_hir(
|
tcx.struct_span_lint_hir(crate::lint::INVALID_HTML_TAGS, hir_id, sp, msg, |lint| {
|
||||||
crate::lint::INVALID_HTML_TAGS,
|
|
||||||
hir_id,
|
|
||||||
sp,
|
|
||||||
msg.to_string(),
|
|
||||||
|lint| {
|
|
||||||
use rustc_lint_defs::Applicability;
|
use rustc_lint_defs::Applicability;
|
||||||
// If a tag looks like `<this>`, it might actually be a generic.
|
// If a tag looks like `<this>`, it might actually be a generic.
|
||||||
// We don't try to detect stuff `<like, this>` because that's not valid HTML,
|
// We don't try to detect stuff `<like, this>` because that's not valid HTML,
|
||||||
|
@ -108,8 +103,7 @@ pub(crate) fn visit_item(cx: &DocContext<'_>, item: &Item) {
|
||||||
}
|
}
|
||||||
|
|
||||||
lint
|
lint
|
||||||
},
|
});
|
||||||
);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut tags = Vec::new();
|
let mut tags = Vec::new();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue