mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: Fix examples in qldoc
This commit is contained in:
@@ -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;
|
||||
```
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user