Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
18c14ad
Add a `try_clone()` function to `OwnedFd`.
sunfishcode Sep 9, 2021
622dfcc
Fix Windows compilation errors.
sunfishcode Sep 9, 2021
c986c6b
Fix more Windows compilation errors.
sunfishcode Sep 9, 2021
2d6a4c8
Fix another Windows compilation error.
sunfishcode Sep 9, 2021
53e072f
Fix compilation on WASI, which doesn't yet support `dup`.
sunfishcode Oct 5, 2021
89b2e0c
Make `intrinsics::write_bytes` const
lilasta Nov 24, 2021
8f68bdc
Make `Borrow` and `BorrowMut` impls `const`
lilasta Dec 4, 2021
70855b2
Add spin_loop hint for RISC-V architecture
luojia65 Dec 5, 2021
0ccf58b
Update stdarch dependency
luojia65 Dec 9, 2021
d10fe26
Point at capture points for non-`'static` reference crossing a `yield…
estebank Oct 10, 2021
dd81e98
Clean up visual output logic
estebank Oct 11, 2021
ab45ab8
review comments
estebank Oct 12, 2021
09dbf37
Add filtering based on involved required lifetime
estebank Oct 12, 2021
ee0fd10
Point at return type when it introduces `'static` obligation
estebank Oct 12, 2021
10a74ac
Use a more accurate `Span` for `'static` obligation from return type
estebank Oct 12, 2021
0ee723e
Update nll test
estebank Oct 12, 2021
ff13ad7
rebase and update nll test
estebank Oct 12, 2021
83ce1aa
Tweak wording
estebank Oct 15, 2021
9cc7bd7
Review comments
estebank Nov 16, 2021
d33fa13
Remove field from `ErrorValue`
estebank Nov 16, 2021
da5b0cc
review comment
estebank Dec 10, 2021
40f161a
fix tests after rebase
estebank Dec 10, 2021
d2d9eb3
fmt
estebank Dec 10, 2021
e273152
Suggest using a temporary variable to fix borrowck errors
camelid Mar 15, 2021
4b674fa
Rollup merge of #83174 - camelid:borrow-help, r=oli-obk
matthiaskrgr Dec 11, 2021
0eedc9d
Rollup merge of #88794 - sunfishcode:sunfishcode/try-clone, r=joshtri…
matthiaskrgr Dec 11, 2021
fefeb46
Rollup merge of #89734 - estebank:issue-72312, r=nikomatsakis
matthiaskrgr Dec 11, 2021
646af41
Rollup merge of #90081 - woppopo:const_write_bytes, r=oli-obk
matthiaskrgr Dec 11, 2021
b3d402e
Rollup merge of #90270 - woppopo:const_borrow_trait, r=dtolnay
matthiaskrgr Dec 11, 2021
2356936
Rollup merge of #91548 - luojia65:hint-spin-loop-riscv, r=Amanieu
matthiaskrgr Dec 11, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Review comments
  • Loading branch information
estebank committed Dec 10, 2021
commit 9cc7bd769208a9db9670649d6fdede04f1a886fc
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,8 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
if mention_capture {
spans.push(sup_origin.span());
}
// We sort the spans *ignoring* expansion context. Below, the closure logic is repeated
// because one method expects a closure taking `&Span` and the other `&mut Span`.
spans.sort_by_key(|span| (span.lo(), span.hi()));
// We dedup the spans *ignoring* expansion context.
spans.sort();
spans.dedup_by_key(|span| (span.lo(), span.hi()));

// We try to make the output have fewer overlapping spans if possible.
Expand Down Expand Up @@ -183,7 +182,9 @@ impl<'a, 'tcx> NiceRegionError<'a, 'tcx> {
err.span_note(*bound, "`'static` lifetime requirement introduced by this bound");
}
if let SubregionOrigin::Subtype(box TypeTrace { cause, .. }) = sub_origin {
if let ObligationCauseCode::BlockTailExpression(hir_id) = &cause.code {
if let ObligationCauseCode::ReturnValue(hir_id)
| ObligationCauseCode::BlockTailExpression(hir_id) = &cause.code
{
let parent_id = tcx.hir().get_parent_item(*hir_id);
if let Some(fn_decl) = tcx.hir().fn_decl_by_hir_id(parent_id) {
let mut span: MultiSpan = fn_decl.output.span().into();
Expand Down
13 changes: 7 additions & 6 deletions compiler/rustc_infer/src/infer/lexical_region_resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ pub enum RegionResolutionError<'tcx> {
Region<'tcx>,
SubregionOrigin<'tcx>,
Region<'tcx>,
Vec<Span>,
Vec<Span>, // All the influences on a given value that didn't meet its constraints.
),

/// Indicates a `'b: 'a` constraint where `'a` is in a universe that
Expand Down Expand Up @@ -570,9 +570,10 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
// have to revisit this portion of the code and
// think hard about it. =) -- nikomatsakis

// Obtain the spans for all the capture points for
// Obtain the spans for all the places that can
// influence the constraints on this value for
// richer diagnostics in `static_impl_trait`.
let captures: Vec<Span> = self
let influences: Vec<Span> = self
.data
.constraints
.iter()
Expand All @@ -590,7 +591,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
&mut dup_vec,
node_vid,
errors,
captures,
influences,
);
}
}
Expand Down Expand Up @@ -645,7 +646,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
dup_vec: &mut IndexVec<RegionVid, Option<RegionVid>>,
node_idx: RegionVid,
errors: &mut Vec<RegionResolutionError<'tcx>>,
captures: Vec<Span>,
influences: Vec<Span>,
) {
// Errors in expanding nodes result from a lower-bound that is
// not contained by an upper-bound.
Expand Down Expand Up @@ -700,7 +701,7 @@ impl<'cx, 'tcx> LexicalResolver<'cx, 'tcx> {
lower_bound.region,
upper_bound.origin.clone(),
upper_bound.region,
captures,
influences,
));
return;
}
Expand Down