File tree 1 file changed +6
-1
lines changed
compiler/rustc_monomorphize/src/mono_checks
1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 3
3
//! checks in a way that is friendly to incremental compilation.
4
4
5
5
use rustc_middle:: query:: Providers ;
6
- use rustc_middle:: ty:: { Instance , TyCtxt } ;
6
+ use rustc_middle:: ty:: { Instance , InstanceKind , TyCtxt } ;
7
7
8
8
mod abi_check;
9
9
mod move_check;
@@ -12,6 +12,11 @@ fn check_mono_item<'tcx>(tcx: TyCtxt<'tcx>, instance: Instance<'tcx>) {
12
12
let body = tcx. instance_mir ( instance. def ) ;
13
13
abi_check:: check_feature_dependent_abi ( tcx, instance, body) ;
14
14
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
+ }
15
20
}
16
21
17
22
pub ( super ) fn provide ( providers : & mut Providers ) {
You can’t perform that action at this time.
0 commit comments