1
Fork 0

Auto merge of #80510 - JohnTitor:rollup-gow7y0l, r=JohnTitor

Rollup of 7 pull requests

Successful merges:

 - #80185 (Fix ICE when pointing at multi bytes character)
 - #80260 (slightly more typed interface to panic implementation)
 - #80311 (Improvements to NatVis support)
 - #80337 (Use `desc` as a doc-comment for queries if there are no doc comments)
 - #80381 (Revert "Cleanup markdown span handling")
 - #80492 (remove empty wraps, don't return Results from from infallible functions)
 - #80509 (where possible, pass slices instead of &Vec or &String (clippy::ptr_arg))

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
This commit is contained in:
bors 2020-12-30 15:30:56 +00:00
commit 507bff92fa
45 changed files with 384 additions and 276 deletions

View file

@ -954,7 +954,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
&self,
def_id: DefId,
target_place: PlaceRef<'tcx>,
places: &Vec<Operand<'tcx>>,
places: &[Operand<'tcx>],
) -> Option<(Span, Option<GeneratorKind>, Span)> {
debug!(
"closure_span: def_id={:?} target_place={:?} places={:?}",

View file

@ -58,11 +58,7 @@ impl vll::LinkElem for Appearance {
}
impl LocalUseMap {
crate fn build(
live_locals: &Vec<Local>,
elements: &RegionValueElements,
body: &Body<'_>,
) -> Self {
crate fn build(live_locals: &[Local], elements: &RegionValueElements, body: &Body<'_>) -> Self {
let nones = IndexVec::from_elem_n(None, body.local_decls.len());
let mut local_use_map = LocalUseMap {
first_def_at: nones.clone(),

View file

@ -153,7 +153,7 @@ impl<T: Copy + Eq + Hash + std::fmt::Debug, PATH: Default> RefTracking<T, PATH>
}
/// Format a path
fn write_path(out: &mut String, path: &Vec<PathElem>) {
fn write_path(out: &mut String, path: &[PathElem]) {
use self::PathElem::*;
for elem in path.iter() {

View file

@ -140,7 +140,7 @@ impl<'a> BcbCounters<'a> {
/// message for subsequent debugging.
fn make_bcb_counters(
&mut self,
coverage_spans: &Vec<CoverageSpan>,
coverage_spans: &[CoverageSpan],
) -> Result<Vec<CoverageKind>, Error> {
debug!("make_bcb_counters(): adding a counter or expression to each BasicCoverageBlock");
let num_bcbs = self.basic_coverage_blocks.num_nodes();
@ -465,7 +465,7 @@ impl<'a> BcbCounters<'a> {
fn choose_preferred_expression_branch(
&self,
traversal: &TraverseCoverageGraphWithLoops,
branches: &Vec<BcbBranch>,
branches: &[BcbBranch],
) -> BcbBranch {
let branch_needs_a_counter =
|branch: &BcbBranch| branch.counter(&self.basic_coverage_blocks).is_none();
@ -509,7 +509,7 @@ impl<'a> BcbCounters<'a> {
fn find_some_reloop_branch(
&self,
traversal: &TraverseCoverageGraphWithLoops,
branches: &Vec<BcbBranch>,
branches: &[BcbBranch],
) -> Option<BcbBranch> {
let branch_needs_a_counter =
|branch: &BcbBranch| branch.counter(&self.basic_coverage_blocks).is_none();

View file

@ -99,7 +99,7 @@ impl<'a, 'tcx> FunctionItemRefChecker<'a, 'tcx> {
&self,
def_id: DefId,
substs_ref: SubstsRef<'tcx>,
args: &Vec<Operand<'tcx>>,
args: &[Operand<'tcx>],
source_info: SourceInfo,
) {
let param_env = self.tcx.param_env(def_id);
@ -162,7 +162,7 @@ impl<'a, 'tcx> FunctionItemRefChecker<'a, 'tcx> {
.unwrap_or(None)
}
fn nth_arg_span(&self, args: &Vec<Operand<'tcx>>, n: usize) -> Span {
fn nth_arg_span(&self, args: &[Operand<'tcx>], n: usize) -> Span {
match &args[n] {
Operand::Copy(place) | Operand::Move(place) => {
self.body.local_decls[place.local].source_info.span