Skip to content

Commit e33441f

Browse files
committed
Fix CI
1 parent 375350a commit e33441f

File tree

2 files changed

+14
-19
lines changed

2 files changed

+14
-19
lines changed

src/expressions/block-expr.md

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -95,19 +95,15 @@ struct Foo {
9595
x: !,
9696
}
9797
98-
fn diverging_place_read() -> () {
98+
fn diverging_place_read() -> ! {
9999
let foo = Foo { x: make() };
100-
let _: ! = {
101-
// A read of a place expression produces a diverging block
102-
let _x = foo.x;
103-
};
100+
// A read of a place expression produces a diverging block
101+
let _x = foo.x;
104102
}
105103
fn diverging_place_not_read() -> () {
106104
let foo = Foo { x: make() };
107-
let _: () = {
108-
// Asssignment to `_` means the place is not read
109-
let _ = foo.x;
110-
};
105+
// Asssignment to `_` means the place is not read
106+
let _ = foo.x;
111107
}
112108
```
113109

src/expressions/match-expr.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,15 @@ r[expr.match.empty]
103103
If there are no match arms, then the `match` expression is diverging and the type is [`!`](../types/never.md).
104104

105105
> [!EXAMPLE]
106-
```rust
107-
# fn make<T>() -> T { loop {} }
108-
enum Empty {}
109-
110-
fn diverging_match_no_arms() -> ! {
111-
let e: Empty = make();
112-
let
113-
match e {}
114-
}
115-
```
106+
> ```rust
107+
> # fn make<T>() -> T { loop {} }
108+
> enum Empty {}
109+
>
110+
> fn diverging_match_no_arms() -> ! {
111+
> let e: Empty = make();
112+
> match e {}
113+
> }
114+
> ```
116115
117116
118117
r[expr.match.conditional]

0 commit comments

Comments
 (0)