mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
desugar ? operator
This commit is contained in:
parent
924d277f32
commit
b7b9ae59a0
27 changed files with 517 additions and 191 deletions
|
@ -5009,7 +5009,7 @@ fn foo() {
|
|||
fn hover_try_expr_res() {
|
||||
check_hover_range(
|
||||
r#"
|
||||
//- minicore:result
|
||||
//- minicore: try, from, result
|
||||
struct FooError;
|
||||
|
||||
fn foo() -> Result<(), FooError> {
|
||||
|
@ -5023,7 +5023,7 @@ fn foo() -> Result<(), FooError> {
|
|||
);
|
||||
check_hover_range(
|
||||
r#"
|
||||
//- minicore:result
|
||||
//- minicore: try, from, result
|
||||
struct FooError;
|
||||
struct BarError;
|
||||
|
||||
|
@ -5044,6 +5044,7 @@ fn foo() -> Result<(), FooError> {
|
|||
fn hover_try_expr() {
|
||||
check_hover_range(
|
||||
r#"
|
||||
//- minicore: try
|
||||
struct NotResult<T, U>(T, U);
|
||||
struct Short;
|
||||
struct Looooong;
|
||||
|
@ -5061,6 +5062,7 @@ fn foo() -> NotResult<(), Looooong> {
|
|||
);
|
||||
check_hover_range(
|
||||
r#"
|
||||
//- minicore: try
|
||||
struct NotResult<T, U>(T, U);
|
||||
struct Short;
|
||||
struct Looooong;
|
||||
|
@ -5092,7 +5094,7 @@ fn foo() -> Option<()> {
|
|||
"#,
|
||||
expect![[r#"
|
||||
```rust
|
||||
<Option<i32> as Try>::Output
|
||||
i32
|
||||
```"#]],
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue