Skip to content

Commit 4d3ce2e

Browse files
committedJun 17, 2021
Auto merge of #86399 - JohnTitor:rollup-qlm2dvz, r=JohnTitor
Rollup of 7 pull requests Successful merges: - #85663 (Document Arc::from) - #85802 (Rename IoSlice(Mut)::advance to advance_slice and add IoSlice(Mut)::advance) - #85970 (Remove methods under Implementors on trait pages) - #86340 (Use better error message for hard errors in CTFE) - #86343 (Do not emit invalid suggestions on multiple mutable borrow errors) - #86355 (Remove invalid suggestions for assoc consts on placeholder type error) - #86389 (Make `sum()` and `product()` documentation hyperlinks refer to `Iterator` methods.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2 parents 0ef2b4a + 65d412b commit 4d3ce2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+406
-318
lines changed
 

‎compiler/rustc_middle/src/mir/interpret/error.rs‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -518,4 +518,14 @@ impl InterpError<'_> {
518518
_ => false,
519519
}
520520
}
521+
522+
/// Should this error be reported as a hard error, preventing compilation, or a soft error,
523+
/// causing a deny-by-default lint?
524+
pub fn is_hard_err(&self) -> bool {
525+
use InterpError::*;
526+
match *self {
527+
MachineStop(ref err) => err.is_hard_err(),
528+
_ => false,
529+
}
530+
}
521531
}

‎compiler/rustc_mir/src/borrow_check/diagnostics/conflict_errors.rs‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
453453
&mut err,
454454
"",
455455
Some(borrow_span),
456+
None,
456457
);
457458
err.buffer(&mut self.errors_buffer);
458459
}
@@ -498,6 +499,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
498499
&mut err,
499500
"",
500501
None,
502+
None,
501503
);
502504
err
503505
}
@@ -718,6 +720,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
718720
&mut err,
719721
first_borrow_desc,
720722
None,
723+
Some((issued_span, span)),
721724
);
722725

723726
err
@@ -1076,6 +1079,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
10761079
&mut err,
10771080
"",
10781081
None,
1082+
None,
10791083
);
10801084
}
10811085
} else {
@@ -1093,6 +1097,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
10931097
&mut err,
10941098
"",
10951099
None,
1100+
None,
10961101
);
10971102
}
10981103

@@ -1158,6 +1163,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
11581163
&mut err,
11591164
"",
11601165
None,
1166+
None,
11611167
);
11621168

11631169
err.buffer(&mut self.errors_buffer);
@@ -1236,6 +1242,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
12361242
&mut err,
12371243
"",
12381244
None,
1245+
None,
12391246
);
12401247

12411248
let within = if borrow_spans.for_generator() { " by generator" } else { "" };
@@ -1614,6 +1621,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
16141621
&mut err,
16151622
"",
16161623
None,
1624+
None,
16171625
);
16181626

16191627
self.explain_deref_coercion(loan, &mut err);

0 commit comments

Comments
 (0)