This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed
tests/ui-fulldeps/stable-mir Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,7 @@ impl<'tcx> Tables<'tcx> {
71
71
fn rustc_ty_to_ty ( & mut self , ty : Ty < ' tcx > ) -> TyKind {
72
72
match ty. kind ( ) {
73
73
ty:: Bool => TyKind :: RigidTy ( RigidTy :: Bool ) ,
74
- ty:: Char => todo ! ( ) ,
74
+ ty:: Char => TyKind :: RigidTy ( RigidTy :: Char ) ,
75
75
ty:: Int ( _) => todo ! ( ) ,
76
76
ty:: Uint ( _) => todo ! ( ) ,
77
77
ty:: Float ( _) => todo ! ( ) ,
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ pub enum TyKind {
17
17
#[ derive( Clone , Debug ) ]
18
18
pub enum RigidTy {
19
19
Bool ,
20
+ Char ,
20
21
Tuple ( Vec < Ty > ) ,
21
22
}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
67
67
68
68
let types = get_item ( tcx, & items, ( DefKind :: Fn , "types" ) ) . unwrap ( ) ;
69
69
let body = types. body ( ) ;
70
- assert_eq ! ( body. locals. len( ) , 2 ) ;
70
+ assert_eq ! ( body. locals. len( ) , 3 ) ;
71
71
assert_matches ! (
72
72
body. locals[ 0 ] . kind( ) ,
73
73
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
@@ -76,6 +76,10 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
76
76
body. locals[ 1 ] . kind( ) ,
77
77
stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
78
78
) ;
79
+ assert_matches ! (
80
+ body. locals[ 2 ] . kind( ) ,
81
+ stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Char )
82
+ ) ;
79
83
80
84
let drop = get_item ( tcx, & items, ( DefKind :: Fn , "drop" ) ) . unwrap ( ) ;
81
85
let body = drop. body ( ) ;
@@ -167,7 +171,7 @@ fn generate_input(path: &str) -> std::io::Result<()> {
167
171
x_64.wrapping_add(y_64)
168
172
}}
169
173
170
- pub fn types(b: bool) -> bool {{
174
+ pub fn types(b: bool, _: char ) -> bool {{
171
175
b
172
176
}}
173
177
You can’t perform that action at this time.
0 commit comments