using classify()

This commit is contained in:
Jeroen Vannevel 2022-01-10 18:19:37 +00:00
parent 6a1b4912bf
commit 9252c76255
No known key found for this signature in database
GPG Key ID: 78EF5F52F38C49BD

View File

@ -1,6 +1,5 @@
use std::iter::successors; use std::iter::successors;
use hir::TypeInfo;
use hir::{TypeInfo, HirDisplay};
use itertools::Itertools; use itertools::Itertools;
use syntax::{ use syntax::{
algo::neighbor, algo::neighbor,
@ -282,9 +281,9 @@ fn main() {
merge_match_arms, merge_match_arms,
r#"//- minicore: result r#"//- minicore: result
fn func() { fn func() {
match Result::<i32, f32>::Ok(0) { match Result::<f64, f32>::Ok(0f64) {
Ok(x) => $0x.to_string(), Ok(x) => $0x.classify(),
Err(x) => x.to_string() Err(x) => x.classify()
}; };
} }
"#, "#,
@ -293,8 +292,8 @@ fn func() {
} }
// fn func() { // fn func() {
// match Result::<i32, f32>::Ok(0) { // match Result::<f64, f32>::Ok(0f64) {
// Ok(x) => x.to_string(), // Ok(x) => x.classify(),
// Err(x) => x.to_string() // Err(x) => x.classify()
// }; // };
// } // }