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> {
7171 fn rustc_ty_to_ty ( & mut self , ty : Ty < ' tcx > ) -> TyKind {
7272 match ty. kind ( ) {
7373 ty:: Bool => TyKind :: RigidTy ( RigidTy :: Bool ) ,
74- ty:: Char => todo ! ( ) ,
74+ ty:: Char => TyKind :: RigidTy ( RigidTy :: Char ) ,
7575 ty:: Int ( _) => todo ! ( ) ,
7676 ty:: Uint ( _) => todo ! ( ) ,
7777 ty:: Float ( _) => todo ! ( ) ,
Original file line number Diff line number Diff line change @@ -17,5 +17,6 @@ pub enum TyKind {
1717#[ derive( Clone , Debug ) ]
1818pub enum RigidTy {
1919 Bool ,
20+ Char ,
2021 Tuple ( Vec < Ty > ) ,
2122}
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
6767
6868 let types = get_item ( tcx, & items, ( DefKind :: Fn , "types" ) ) . unwrap ( ) ;
6969 let body = types. body ( ) ;
70- assert_eq ! ( body. locals. len( ) , 2 ) ;
70+ assert_eq ! ( body. locals. len( ) , 3 ) ;
7171 assert_matches ! (
7272 body. locals[ 0 ] . kind( ) ,
7373 stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
@@ -76,6 +76,10 @@ fn test_stable_mir(tcx: TyCtxt<'_>) {
7676 body. locals[ 1 ] . kind( ) ,
7777 stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Bool )
7878 ) ;
79+ assert_matches ! (
80+ body. locals[ 2 ] . kind( ) ,
81+ stable_mir:: ty:: TyKind :: RigidTy ( stable_mir:: ty:: RigidTy :: Char )
82+ ) ;
7983
8084 let drop = get_item ( tcx, & items, ( DefKind :: Fn , "drop" ) ) . unwrap ( ) ;
8185 let body = drop. body ( ) ;
@@ -167,7 +171,7 @@ fn generate_input(path: &str) -> std::io::Result<()> {
167171 x_64.wrapping_add(y_64)
168172 }}
169173
170- pub fn types(b: bool) -> bool {{
174+ pub fn types(b: bool, _: char ) -> bool {{
171175 b
172176 }}
173177
You can’t perform that action at this time.
0 commit comments