File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
compiler/rustc_monomorphize/src/mono_checks Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 33//! checks in a way that is friendly to incremental compilation.
44
55use rustc_middle:: query:: Providers ;
6- use rustc_middle:: ty:: { Instance , TyCtxt } ;
6+ use rustc_middle:: ty:: { Instance , InstanceKind , TyCtxt } ;
77
88mod abi_check;
99mod move_check;
@@ -12,6 +12,11 @@ fn check_mono_item<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) {
1212 let body = tcx. instance_mir ( instance. def ) ;
1313 abi_check:: check_feature_dependent_abi ( tcx, instance, body) ;
1414 move_check:: check_moves ( tcx, instance, body) ;
15+ if let InstanceKind :: Item ( def_id) = instance. def {
16+ if tcx. instantiate_and_check_impossible_predicates ( ( def_id, instance. args ) ) {
17+ tcx. dcx ( ) . span_err ( tcx. def_span ( def_id) , "post-mono" ) ;
18+ }
19+ }
1520}
1621
1722pub ( super ) fn provide ( providers : & mut Providers ) {
You can’t perform that action at this time.
0 commit comments