Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
85f6025
Store `Results` in Formatter.
nnethercote Apr 21, 2025
55a80cc
Move `StateDiffCollector`'s use point.
nnethercote Apr 21, 2025
3bd1e14
Remove unused `ResultsCursor` methods.
nnethercote Apr 21, 2025
521b379
Remove unnecessary lifetime on `ResultsVisitor`.
nnethercote Apr 22, 2025
e800bf7
Update `compiler_builtins` to 0.1.156
tgross35 Apr 22, 2025
e827b17
Move make_unclosed_delims_error to lexer/diagonostics.rs
xizheyin Apr 22, 2025
dce5d99
Rename `open_brace` to `open_delimiters`
xizheyin Apr 22, 2025
5d29521
Use `is_lang_item` and `as_lang_item` instead of handrolling their logic
oli-obk Apr 22, 2025
006b7e3
Validate extension in `PathBuf::add_extension`
thaliaarchi Apr 22, 2025
634baf4
Ping Mara when touching format_args!() internals.
m-ou-se Apr 22, 2025
44b19e5
rc and cr more clear error message
Kivooeo Apr 22, 2025
1b9e11e
Rollup merge of #140142 - nnethercote:some-graphviz-tweaks-2, r=compi…
ChrisDenton Apr 23, 2025
538ae99
Rollup merge of #140146 - tgross35:update-builtins, r=tgross35
ChrisDenton Apr 23, 2025
090f6a9
Rollup merge of #140147 - xizheyin:issue-138401-1, r=compiler-errors
ChrisDenton Apr 23, 2025
b03267f
Rollup merge of #140160 - oli-obk:lang-items, r=jieyouxu
ChrisDenton Apr 23, 2025
ed4e167
Rollup merge of #140163 - thaliaarchi:pathbuf-validate-extension, r=C…
ChrisDenton Apr 23, 2025
45b5d8b
Rollup merge of #140173 - m-ou-se:triagebot-config, r=ChrisDenton
ChrisDenton Apr 23, 2025
ecb9775
Rollup merge of #140175 - Kivooeo:new-fix-one, r=compiler-errors
ChrisDenton Apr 23, 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
Remove unnecessary lifetime on ResultsVisitor.
  • Loading branch information
nnethercote committed Apr 22, 2025
commit 521b379705bcdd9ea41e8bce56bfd16ba1b90703
12 changes: 6 additions & 6 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -702,12 +702,12 @@ struct MirBorrowckCtxt<'a, 'infcx, 'tcx> {
// 2. loans made in overlapping scopes do not conflict
// 3. assignments do not affect things loaned out as immutable
// 4. moves do not affect things loaned out in any way
impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<'a, '_, 'tcx> {
impl<'a, 'tcx> ResultsVisitor<'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<'a, '_, 'tcx> {
fn visit_after_early_statement_effect(
&mut self,
_results: &mut Results<'tcx, Borrowck<'a, 'tcx>>,
state: &BorrowckDomain,
stmt: &'a Statement<'tcx>,
stmt: &Statement<'tcx>,
location: Location,
) {
debug!("MirBorrowckCtxt::process_statement({:?}, {:?}): {:?}", location, stmt, state);
Expand Down Expand Up @@ -783,7 +783,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
&mut self,
_results: &mut Results<'tcx, Borrowck<'a, 'tcx>>,
state: &BorrowckDomain,
term: &'a Terminator<'tcx>,
term: &Terminator<'tcx>,
loc: Location,
) {
debug!("MirBorrowckCtxt::process_terminator({:?}, {:?}): {:?}", loc, term, state);
Expand Down Expand Up @@ -896,7 +896,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, Borrowck<'a, 'tcx>> for MirBorrowckCtxt<
&mut self,
_results: &mut Results<'tcx, Borrowck<'a, 'tcx>>,
state: &BorrowckDomain,
term: &'a Terminator<'tcx>,
term: &Terminator<'tcx>,
loc: Location,
) {
let span = term.source_info.span;
Expand Down Expand Up @@ -1363,7 +1363,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
fn consume_rvalue(
&mut self,
location: Location,
(rvalue, span): (&'a Rvalue<'tcx>, Span),
(rvalue, span): (&Rvalue<'tcx>, Span),
state: &BorrowckDomain,
) {
match rvalue {
Expand Down Expand Up @@ -1636,7 +1636,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
fn consume_operand(
&mut self,
location: Location,
(operand, span): (&'a Operand<'tcx>, Span),
(operand, span): (&Operand<'tcx>, Span),
state: &BorrowckDomain,
) {
match *operand {
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_mir_dataflow/src/framework/direction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pub trait Direction {
block: BasicBlock,
block_data: &'mir mir::BasicBlockData<'tcx>,
results: &mut Results<'tcx, A>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) where
A: Analysis<'tcx>;
}
Expand Down Expand Up @@ -212,7 +212,7 @@ impl Direction for Backward {
block: BasicBlock,
block_data: &'mir mir::BasicBlockData<'tcx>,
results: &mut Results<'tcx, A>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) where
A: Analysis<'tcx>,
{
Expand Down Expand Up @@ -394,7 +394,7 @@ impl Direction for Forward {
block: BasicBlock,
block_data: &'mir mir::BasicBlockData<'tcx>,
results: &mut Results<'tcx, A>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) where
A: Analysis<'tcx>,
{
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_mir_dataflow/src/framework/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -710,7 +710,7 @@ impl<D> StateDiffCollector<D> {
}
}

impl<'tcx, A> ResultsVisitor<'_, 'tcx, A> for StateDiffCollector<A::Domain>
impl<'tcx, A> ResultsVisitor<'tcx, A> for StateDiffCollector<A::Domain>
where
A: Analysis<'tcx>,
A::Domain: DebugWithContext<A>,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_mir_dataflow/src/framework/results.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,15 +47,15 @@ where
&mut self,
body: &'mir Body<'tcx>,
blocks: impl IntoIterator<Item = BasicBlock>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) {
visit_results(body, blocks, self, vis)
}

pub fn visit_reachable_with<'mir>(
&mut self,
body: &'mir Body<'tcx>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) {
let blocks = traversal::reachable(body);
visit_results(body, blocks.map(|(bb, _)| bb), self, vis)
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_mir_dataflow/src/framework/visitor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pub fn visit_results<'mir, 'tcx, A>(
body: &'mir mir::Body<'tcx>,
blocks: impl IntoIterator<Item = BasicBlock>,
results: &mut Results<'tcx, A>,
vis: &mut impl ResultsVisitor<'mir, 'tcx, A>,
vis: &mut impl ResultsVisitor<'tcx, A>,
) where
A: Analysis<'tcx>,
{
Expand All @@ -29,7 +29,7 @@ pub fn visit_results<'mir, 'tcx, A>(
/// A visitor over the results of an `Analysis`. Use this when you want to inspect domain values in
/// many or all locations; use `ResultsCursor` if you want to inspect domain values only in certain
/// locations.
pub trait ResultsVisitor<'mir, 'tcx, A>
pub trait ResultsVisitor<'tcx, A>
where
A: Analysis<'tcx>,
{
Expand All @@ -40,7 +40,7 @@ where
&mut self,
_results: &mut Results<'tcx, A>,
_state: &A::Domain,
_statement: &'mir mir::Statement<'tcx>,
_statement: &mir::Statement<'tcx>,
_location: Location,
) {
}
Expand All @@ -50,7 +50,7 @@ where
&mut self,
_results: &mut Results<'tcx, A>,
_state: &A::Domain,
_statement: &'mir mir::Statement<'tcx>,
_statement: &mir::Statement<'tcx>,
_location: Location,
) {
}
Expand All @@ -60,7 +60,7 @@ where
&mut self,
_results: &mut Results<'tcx, A>,
_state: &A::Domain,
_terminator: &'mir mir::Terminator<'tcx>,
_terminator: &mir::Terminator<'tcx>,
_location: Location,
) {
}
Expand All @@ -72,7 +72,7 @@ where
&mut self,
_results: &mut Results<'tcx, A>,
_state: &A::Domain,
_terminator: &'mir mir::Terminator<'tcx>,
_terminator: &mir::Terminator<'tcx>,
_location: Location,
) {
}
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_mir_dataflow/src/points.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,12 +120,12 @@ struct Visitor<'a, N: Idx> {
values: SparseIntervalMatrix<N, PointIndex>,
}

impl<'mir, 'tcx, A, N> ResultsVisitor<'mir, 'tcx, A> for Visitor<'_, N>
impl<'tcx, A, N> ResultsVisitor<'tcx, A> for Visitor<'_, N>
where
A: Analysis<'tcx, Domain = DenseBitSet<N>>,
N: Idx,
{
fn visit_after_primary_statement_effect(
fn visit_after_primary_statement_effect<'mir>(
&mut self,
_results: &mut Results<'tcx, A>,
state: &A::Domain,
Expand All @@ -139,7 +139,7 @@ where
});
}

fn visit_after_primary_terminator_effect(
fn visit_after_primary_terminator_effect<'mir>(
&mut self,
_results: &mut Results<'tcx, A>,
state: &A::Domain,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_mir_transform/src/coroutine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -875,14 +875,14 @@ struct StorageConflictVisitor<'a, 'tcx> {
eligible_storage_live: DenseBitSet<Local>,
}

impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, MaybeRequiresStorage<'a, 'tcx>>
impl<'a, 'tcx> ResultsVisitor<'tcx, MaybeRequiresStorage<'a, 'tcx>>
for StorageConflictVisitor<'a, 'tcx>
{
fn visit_after_early_statement_effect(
&mut self,
_results: &mut Results<'tcx, MaybeRequiresStorage<'a, 'tcx>>,
state: &DenseBitSet<Local>,
_statement: &'a Statement<'tcx>,
_statement: &Statement<'tcx>,
loc: Location,
) {
self.apply_state(state, loc);
Expand All @@ -892,7 +892,7 @@ impl<'a, 'tcx> ResultsVisitor<'a, 'tcx, MaybeRequiresStorage<'a, 'tcx>>
&mut self,
_results: &mut Results<'tcx, MaybeRequiresStorage<'a, 'tcx>>,
state: &DenseBitSet<Local>,
_terminator: &'a Terminator<'tcx>,
_terminator: &Terminator<'tcx>,
loc: Location,
) {
self.apply_state(state, loc);
Expand Down
8 changes: 4 additions & 4 deletions compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -958,13 +958,13 @@ fn try_write_constant<'tcx>(
interp_ok(())
}

impl<'mir, 'tcx> ResultsVisitor<'mir, 'tcx, ConstAnalysis<'_, 'tcx>> for Collector<'_, 'tcx> {
impl<'tcx> ResultsVisitor<'tcx, ConstAnalysis<'_, 'tcx>> for Collector<'_, 'tcx> {
#[instrument(level = "trace", skip(self, results, statement))]
fn visit_after_early_statement_effect(
&mut self,
results: &mut Results<'tcx, ConstAnalysis<'_, 'tcx>>,
state: &State<FlatSet<Scalar>>,
statement: &'mir Statement<'tcx>,
statement: &Statement<'tcx>,
location: Location,
) {
match &statement.kind {
Expand All @@ -986,7 +986,7 @@ impl<'mir, 'tcx> ResultsVisitor<'mir, 'tcx, ConstAnalysis<'_, 'tcx>> for Collect
&mut self,
results: &mut Results<'tcx, ConstAnalysis<'_, 'tcx>>,
state: &State<FlatSet<Scalar>>,
statement: &'mir Statement<'tcx>,
statement: &Statement<'tcx>,
location: Location,
) {
match statement.kind {
Expand All @@ -1011,7 +1011,7 @@ impl<'mir, 'tcx> ResultsVisitor<'mir, 'tcx, ConstAnalysis<'_, 'tcx>> for Collect
&mut self,
results: &mut Results<'tcx, ConstAnalysis<'_, 'tcx>>,
state: &State<FlatSet<Scalar>>,
terminator: &'mir Terminator<'tcx>,
terminator: &Terminator<'tcx>,
location: Location,
) {
OperandCollector {
Expand Down
Loading