Skip to content

Commit

Permalink
Auto merge of rust-lang#115553 - matthiaskrgr:rollup-c0045hz, r=matth…
Browse files Browse the repository at this point in the history
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#115353 (Emit error instead of ICE when optimized MIR is missing)
 - rust-lang#115488 (Take `&mut Results` in `ResultsVisitor`)
 - rust-lang#115492 (Allow `large_assignments` for Box/Arc/Rc initialization)
 - rust-lang#115519 (Don't ICE on associated type projection without feature gate in new solver)
 - rust-lang#115534 (Expose more information with DefId in smir)

r? `@ghost`
`@rustbot` modify labels: rollup
  • Loading branch information
bors committed Sep 5, 2023
2 parents 626a6ab + 03853d5 commit 8cfaf70
Show file tree
Hide file tree
Showing 19 changed files with 286 additions and 41 deletions.
6 changes: 3 additions & 3 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro

fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
stmt: &'cx Statement<'tcx>,
location: Location,
Expand Down Expand Up @@ -673,7 +673,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro

fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
term: &'cx Terminator<'tcx>,
loc: Location,
Expand Down Expand Up @@ -784,7 +784,7 @@ impl<'cx, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'cx, 'tcx, R> for MirBorro

fn visit_terminator_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
flow_state: &Flows<'cx, 'tcx>,
term: &'cx Terminator<'tcx>,
loc: Location,
Expand Down
12 changes: 6 additions & 6 deletions compiler/rustc_mir_dataflow/src/framework/graphviz.rs
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ where

fn visit_block_start(
&mut self,
_results: &Results<'tcx, A>,
_results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_block_data: &mir::BasicBlockData<'tcx>,
_block: BasicBlock,
Expand All @@ -550,7 +550,7 @@ where

fn visit_block_end(
&mut self,
_results: &Results<'tcx, A>,
_results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_block_data: &mir::BasicBlockData<'tcx>,
_block: BasicBlock,
Expand All @@ -562,7 +562,7 @@ where

fn visit_statement_before_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_statement: &mir::Statement<'tcx>,
_location: Location,
Expand All @@ -575,7 +575,7 @@ where

fn visit_statement_after_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_statement: &mir::Statement<'tcx>,
_location: Location,
Expand All @@ -586,7 +586,7 @@ where

fn visit_terminator_before_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_terminator: &mir::Terminator<'tcx>,
_location: Location,
Expand All @@ -599,7 +599,7 @@ where

fn visit_terminator_after_primary_effect(
&mut self,
results: &Results<'tcx, A>,
results: &mut Results<'tcx, A>,
state: &Self::FlowState,
_terminator: &mir::Terminator<'tcx>,
_location: Location,
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 @@ -35,7 +35,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {

fn visit_block_start(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_block_data: &'mir mir::BasicBlockData<'tcx>,
_block: BasicBlock,
Expand All @@ -46,7 +46,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {
/// its `statement_effect`.
fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_statement: &'mir mir::Statement<'tcx>,
_location: Location,
Expand All @@ -57,7 +57,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {
/// statement applied to `state`.
fn visit_statement_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_statement: &'mir mir::Statement<'tcx>,
_location: Location,
Expand All @@ -68,7 +68,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {
/// its `terminator_effect`.
fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_terminator: &'mir mir::Terminator<'tcx>,
_location: Location,
Expand All @@ -81,7 +81,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {
/// The `call_return_effect` (if one exists) will *not* be applied to `state`.
fn visit_terminator_after_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_terminator: &'mir mir::Terminator<'tcx>,
_location: Location,
Expand All @@ -90,7 +90,7 @@ pub trait ResultsVisitor<'mir, 'tcx, R> {

fn visit_block_end(
&mut self,
_results: &R,
_results: &mut R,
_state: &Self::FlowState,
_block_data: &'mir mir::BasicBlockData<'tcx>,
_block: BasicBlock,
Expand Down
6 changes: 3 additions & 3 deletions compiler/rustc_mir_transform/src/dataflow_const_prop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ impl<'mir, 'tcx>

fn visit_statement_before_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
statement: &'mir Statement<'tcx>,
location: Location,
Expand All @@ -417,7 +417,7 @@ impl<'mir, 'tcx>

fn visit_statement_after_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
statement: &'mir Statement<'tcx>,
location: Location,
Expand All @@ -443,7 +443,7 @@ impl<'mir, 'tcx>

fn visit_terminator_before_primary_effect(
&mut self,
results: &Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
results: &mut Results<'tcx, ValueAnalysisWrapper<ConstAnalysis<'_, 'tcx>>>,
state: &Self::FlowState,
terminator: &'mir Terminator<'tcx>,
location: Location,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_mir_transform/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -814,7 +814,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>

fn visit_statement_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
state: &Self::FlowState,
_statement: &'mir Statement<'tcx>,
loc: Location,
Expand All @@ -824,7 +824,7 @@ impl<'mir, 'tcx, R> rustc_mir_dataflow::ResultsVisitor<'mir, 'tcx, R>

fn visit_terminator_before_primary_effect(
&mut self,
_results: &R,
_results: &mut R,
state: &Self::FlowState,
_terminator: &'mir Terminator<'tcx>,
loc: Location,
Expand Down
4 changes: 4 additions & 0 deletions compiler/rustc_monomorphize/messages.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ monomorphize_large_assignments =
.label = value moved from here
.note = The current maximum size is {$limit}, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]`
monomorphize_no_optimized_mir =
missing optimized MIR for an item in the crate `{$crate_name}`
.note = missing optimized MIR for this item (was the crate `{$crate_name}` compiled with `--emit=metadata`?)
monomorphize_recursion_limit =
reached the recursion limit while instantiating `{$shrunk}`
.note = `{$def_path_str}` defined here
Expand Down
Loading

0 comments on commit 8cfaf70

Please sign in to comment.