mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
using classify()
This commit is contained in:
parent
6a1b4912bf
commit
9252c76255
@ -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()
|
||||||
// };
|
// };
|
||||||
// }
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user