Rust: Fix examples in qldoc

This commit is contained in:
Simon Friis Vindum
2025-08-26 10:29:04 +02:00
parent fb7c3f32d3
commit 17f7b7f710
15 changed files with 56 additions and 49 deletions

View File

@@ -434,8 +434,8 @@ class _:
```rust
let first = Foo { a: 1, b: 2 };
let second = Foo { a: 2, ..first };
Foo { a: 1, b: 2 }[2] = 10;
Foo { .. } = second;
let n = Foo { a: 1, b: 2 }.b;
Foo { a: m, .. } = second;
```
"""
path: drop
@@ -563,8 +563,9 @@ class _:
"""
A tuple expression. For example:
```rust
(1, "one");
(2, "two")[0] = 3;
let tuple = (1, "one");
let n = (2, "two").0;
let (a, b) = tuple;
```
"""