mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Add generated doctest
This commit is contained in:
parent
5b9f8e7e8e
commit
d0cf28322a
1 changed files with 19 additions and 0 deletions
|
@ -367,6 +367,25 @@ impl Point {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_destructure_tuple_binding() {
|
||||
check_doc_test(
|
||||
"destructure_tuple_binding",
|
||||
r#####"
|
||||
fn main() {
|
||||
let $0t = (1,2);
|
||||
let v = t.0;
|
||||
}
|
||||
"#####,
|
||||
r#####"
|
||||
fn main() {
|
||||
let ($0_0, _1) = (1,2);
|
||||
let v = _0;
|
||||
}
|
||||
"#####,
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn doctest_expand_glob_import() {
|
||||
check_doc_test(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue