Skip to content

Rollup of 9 pull requests #139781

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
22dd86c
Encode dep node edge count as u32 instead of usize
Zoxc Apr 6, 2025
923f44c
consistent name for `UniversalRegions`
lcnr Apr 11, 2025
8cb7274
use input `def_id` to compute `movable_coroutine`
lcnr Apr 11, 2025
848187c
`local_names` creation to `mbcx` creation
lcnr Apr 11, 2025
0186459
do not buffer `#[rustc_regions]` dump
lcnr Apr 11, 2025
0e294f2
`MirBorrowckCtxt::polonius_output` to ref
lcnr Apr 11, 2025
2c65469
move `dump_polonius_mir`
lcnr Apr 11, 2025
c5fdddc
don't rely on `locals_are_invalidated_at_exit`
lcnr Apr 11, 2025
8303383
remove redundant fields
lcnr Apr 11, 2025
5d00483
`NonGenericOpaqueTypeParam::ty` to `arg`
lcnr Apr 11, 2025
420390c
eagerly initialize `definitions` in sub-fn
lcnr Apr 11, 2025
bc94c38
Proactively update coroutine drop shim's phase to account for later p…
compiler-errors Apr 12, 2025
accae53
Move FlagComputation, PatternKind, and TypeWalker to rustc_type_ir
jackh726 Apr 8, 2025
f472cc8
error on unsafe attributes in pre-2024 editions
folkertdev Apr 12, 2025
b203d40
compiletest: add `camino` for UTF-8 path handling
jieyouxu Apr 11, 2025
e24b0c8
compiletest: consistently use `{Utf8Path,Utf8PathBuf}`
jieyouxu Apr 11, 2025
957324b
rustdoc-gui-test: pass a `camino::Utf8PathBuf` to `compiletest`
jieyouxu Apr 12, 2025
93bee07
UI tests: migrate remaining compile time `error-pattern`s to line ann…
petrochenkov Apr 12, 2025
d50a8d5
Improve `-Z crate-attr` diagnostics
jyn514 Mar 11, 2025
3efd9f5
Switch to `diagnostic::on_unimplemented`
mejrs Apr 13, 2025
2b6835b
Rollup merge of #138336 - jyn514:crate-attr-diagnostics, r=compiler-e…
jhpratt Apr 14, 2025
5c494aa
Rollup merge of #139636 - Zoxc:graph-edges-len-u32, r=compiler-errors
jhpratt Apr 14, 2025
a642232
Rollup merge of #139666 - lcnr:pre-revealing-use-cleanup, r=compiler-…
jhpratt Apr 14, 2025
6fe6985
Rollup merge of #139695 - jieyouxu:compiletest-utf8path, r=Kobzol
jhpratt Apr 14, 2025
c0ad72e
Rollup merge of #139699 - compiler-errors:coroutine-drop-phase, r=sco…
jhpratt Apr 14, 2025
4a1d0cd
Rollup merge of #139718 - folkertdev:unsafe-attributes-earlier-editio…
jhpratt Apr 14, 2025
bb93324
Rollup merge of #139722 - jackh726:patternkind-walk-toir, r=compiler-…
jhpratt Apr 14, 2025
883c8dd
Rollup merge of #139760 - petrochenkov:noerrpat2, r=jieyouxu
jhpratt Apr 14, 2025
b06f38c
Rollup merge of #139776 - mejrs:diagn2, r=compiler-errors
jhpratt Apr 14, 2025
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
do not buffer #[rustc_regions] dump
  • Loading branch information
lcnr committed Apr 11, 2025
commit 01864596dc67a753364df1ce2e2c0915401c57ef
4 changes: 2 additions & 2 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,12 @@ fn do_mir_borrowck<'tcx>(

// We also have a `#[rustc_regions]` annotation that causes us to dump
// information.
let diags_buffer = &mut BorrowckDiagnosticsBuffer::default();
nll::dump_annotation(&infcx, body, &regioncx, &opt_closure_req, diags_buffer);
nll::dump_annotation(&infcx, body, &regioncx, &opt_closure_req);

let movable_coroutine = body.coroutine.is_some()
&& tcx.coroutine_movability(def.to_def_id()) == hir::Movability::Movable;

let diags_buffer = &mut BorrowckDiagnosticsBuffer::default();
// While promoteds should mostly be correct by construction, we need to check them for
// invalid moves to detect moving out of arrays:`struct S; fn main() { &([S][0]); }`.
for promoted_body in &promoted {
Expand Down
7 changes: 2 additions & 5 deletions compiler/rustc_borrowck/src/nll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use tracing::{debug, instrument};

use crate::borrow_set::BorrowSet;
use crate::consumers::ConsumerOptions;
use crate::diagnostics::{BorrowckDiagnosticsBuffer, RegionErrors};
use crate::diagnostics::RegionErrors;
use crate::polonius::PoloniusDiagnosticsContext;
use crate::polonius::legacy::{
PoloniusFacts, PoloniusFactsExt, PoloniusLocationTable, PoloniusOutput,
Expand Down Expand Up @@ -297,7 +297,6 @@ pub(super) fn dump_annotation<'tcx, 'infcx>(
body: &Body<'tcx>,
regioncx: &RegionInferenceContext<'tcx>,
closure_region_requirements: &Option<ClosureRegionRequirements<'tcx>>,
diagnostics_buffer: &mut BorrowckDiagnosticsBuffer<'infcx, 'tcx>,
) {
let tcx = infcx.tcx;
let base_def_id = tcx.typeck_root_def_id(body.source.def_id());
Expand Down Expand Up @@ -335,13 +334,11 @@ pub(super) fn dump_annotation<'tcx, 'infcx>(
} else {
let mut err = infcx.dcx().struct_span_note(def_span, "no external requirements");
regioncx.annotate(tcx, &mut err);

err
};

// FIXME(@lcnr): We currently don't dump the inferred hidden types here.

diagnostics_buffer.buffer_non_error(err);
err.emit();
}

fn for_each_region_constraint<'tcx>(
Expand Down