diff options
| author | Santiago Pastorino <spastorino@gmail.com> | 2023-07-05 19:30:24 -0300 |
|---|---|---|
| committer | Santiago Pastorino <spastorino@gmail.com> | 2023-07-07 13:47:55 -0300 |
| commit | 9ca51b92d4a056d22d3b3d22e54bbb29ed205a40 (patch) | |
| tree | c486b3944102140be8b465900dbb0518a5407d77 /tests | |
| parent | 42eccffce3e950e95d9e965d4dd58ecb44633d55 (diff) | |
| download | rust-9ca51b92d4a056d22d3b3d22e54bbb29ed205a40.tar.gz rust-9ca51b92d4a056d22d3b3d22e54bbb29ed205a40.zip | |
Add Float ty to SMIR
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui-fulldeps/stable-mir/crate-info.rs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/ui-fulldeps/stable-mir/crate-info.rs b/tests/ui-fulldeps/stable-mir/crate-info.rs index 29cc6e78d88..3c0d684a4d7 100644 --- a/tests/ui-fulldeps/stable-mir/crate-info.rs +++ b/tests/ui-fulldeps/stable-mir/crate-info.rs @@ -67,7 +67,7 @@ fn test_stable_mir(tcx: TyCtxt<'_>) { let types = get_item(tcx, &items, (DefKind::Fn, "types")).unwrap(); let body = types.body(); - assert_eq!(body.locals.len(), 5); + assert_eq!(body.locals.len(), 6); assert_matches!( body.locals[0].kind(), stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Bool) @@ -88,6 +88,12 @@ fn test_stable_mir(tcx: TyCtxt<'_>) { body.locals[4].kind(), stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Uint(stable_mir::ty::UintTy::U64)) ); + assert_matches!( + body.locals[5].kind(), + stable_mir::ty::TyKind::RigidTy(stable_mir::ty::RigidTy::Float( + stable_mir::ty::FloatTy::F64 + )) + ); let drop = get_item(tcx, &items, (DefKind::Fn, "drop")).unwrap(); let body = drop.body(); @@ -179,7 +185,7 @@ fn generate_input(path: &str) -> std::io::Result<()> { x_64.wrapping_add(y_64) }} - pub fn types(b: bool, _: char, _: i32, _: u64) -> bool {{ + pub fn types(b: bool, _: char, _: i32, _: u64, _: f64) -> bool {{ b }} |
