mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-25 20:43:21 +00:00
using classify()
This commit is contained in:
parent
6a1b4912bf
commit
9252c76255
1 changed files with 7 additions and 8 deletions
|
@ -1,6 +1,5 @@
|
|||
use std::iter::successors;
|
||||
|
||||
use hir::{TypeInfo, HirDisplay};
|
||||
use hir::TypeInfo;
|
||||
use itertools::Itertools;
|
||||
use syntax::{
|
||||
algo::neighbor,
|
||||
|
@ -282,9 +281,9 @@ fn main() {
|
|||
merge_match_arms,
|
||||
r#"//- minicore: result
|
||||
fn func() {
|
||||
match Result::<i32, f32>::Ok(0) {
|
||||
Ok(x) => $0x.to_string(),
|
||||
Err(x) => x.to_string()
|
||||
match Result::<f64, f32>::Ok(0f64) {
|
||||
Ok(x) => $0x.classify(),
|
||||
Err(x) => x.classify()
|
||||
};
|
||||
}
|
||||
"#,
|
||||
|
@ -293,8 +292,8 @@ fn func() {
|
|||
}
|
||||
|
||||
// fn func() {
|
||||
// match Result::<i32, f32>::Ok(0) {
|
||||
// Ok(x) => x.to_string(),
|
||||
// Err(x) => x.to_string()
|
||||
// match Result::<f64, f32>::Ok(0f64) {
|
||||
// Ok(x) => x.classify(),
|
||||
// Err(x) => x.classify()
|
||||
// };
|
||||
// }
|
||||
|
|
Loading…
Reference in a new issue