File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
branches/beta/src/librustc/middle Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
23
23
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
24
24
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
25
25
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26
- refs/heads/beta: bba1596c71989bdbad19ec06b27fa0d81d5bc58f
26
+ refs/heads/beta: a48bd1718356cdcc4204b57ed282ff8111df5427
27
27
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28
28
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
29
29
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
Original file line number Diff line number Diff line change @@ -854,16 +854,12 @@ pub fn eval_const_expr_partial<'tcx>(tcx: &TyCtxt<'tcx>,
854
854
Some ( actual_e) => actual_e,
855
855
None => signal ! ( e, NonConstPath )
856
856
} ;
857
- let item_hint = if let UncheckedExprNoHint = ty_hint {
858
- match const_ty {
859
- Some ( ty) => match ast_ty_to_prim_ty ( tcx, ty) {
860
- Some ( ty) => UncheckedExprHint ( ty) ,
861
- None => UncheckedExprNoHint
862
- } ,
863
- None => UncheckedExprNoHint
864
- }
865
- } else {
866
- ty_hint
857
+ let item_hint = match const_ty {
858
+ Some ( ty) => match ast_ty_to_prim_ty ( tcx, ty) {
859
+ Some ( ty) => ty_hint. checked_or ( ty) ,
860
+ None => ty_hint. erase_hint ( ) ,
861
+ } ,
862
+ None => ty_hint. erase_hint ( ) ,
867
863
} ;
868
864
try!( eval_const_expr_partial ( tcx, const_expr, item_hint, fn_args) )
869
865
}
You can’t perform that action at this time.
0 commit comments