File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed
compiler/rustc_mir/src/interpret Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -83,7 +83,26 @@ crate fn eval_nullary_intrinsic<'tcx>(
83
83
| ty:: Bound ( _, _)
84
84
| ty:: Placeholder ( _)
85
85
| ty:: Infer ( _) => throw_inval ! ( TooGeneric ) ,
86
- _ => ConstValue :: from_machine_usize ( 0u64 , & tcx) ,
86
+ ty:: Bool
87
+ | ty:: Char
88
+ | ty:: Int ( _)
89
+ | ty:: Uint ( _)
90
+ | ty:: Float ( _)
91
+ | ty:: Foreign ( _)
92
+ | ty:: Str
93
+ | ty:: Array ( _, _)
94
+ | ty:: Slice ( _)
95
+ | ty:: RawPtr ( _)
96
+ | ty:: Ref ( _, _, _)
97
+ | ty:: FnDef ( _, _)
98
+ | ty:: FnPtr ( _)
99
+ | ty:: Dynamic ( _, _)
100
+ | ty:: Closure ( _, _)
101
+ | ty:: Generator ( _, _, _)
102
+ | ty:: GeneratorWitness ( _)
103
+ | ty:: Never
104
+ | ty:: Tuple ( _)
105
+ | ty:: Error ( _) => ConstValue :: from_machine_usize ( 0u64 , & tcx) ,
87
106
} ,
88
107
other => bug ! ( "`{}` is not a zero arg intrinsic" , other) ,
89
108
} )
You can’t perform that action at this time.
0 commit comments