Skip to content

Fix a typo and make a minor improvement #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 206 commits into
base: ja
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
206 commits
Select commit Hold shift + click to select a range
443fc03
Remove awkward match in if_let
gepbird Jul 5, 2023
5b1e946
Revert "Remove awkward match in if_let"
gepbird Jul 5, 2023
7442728
Remove unnecessary block in awkward match
gepbird Jul 5, 2023
7e68ba5
Edit grammatical mistake
progalgo Mar 24, 2024
7e4b2ce
Fix an external link to absolute
dalance May 7, 2024
7133f4c
Fix some broken links in ja.po
dalance May 14, 2024
50b7013
Merge pull request #1842 from dalance/fix_link
marioidival May 14, 2024
c84e386
Merge pull request #1844 from dalance/fix_broken_links
marioidival May 14, 2024
d748b47
Add explicit section link
dalance May 17, 2024
6b9f38b
Update mdbook version in CI
dalance May 17, 2024
b8052df
Adjust translation build on CI
dalance May 17, 2024
b03d0d3
Merge pull request #1848 from dalance/update_mdbook
marioidival May 18, 2024
1ca1352
Merge pull request #1849 from dalance/update_translation_build
marioidival May 18, 2024
3d902f8
Merge pull request #1847 from dalance/explicit_section_name
marioidival May 18, 2024
65f37d5
Update ja.po
dalance May 19, 2024
0d22813
Merge pull request #1850 from dalance/update_ja
marioidival May 19, 2024
0a2ab00
Clarify interchangability for From and Into
xpcoffee May 19, 2024
2caac6e
Fix import
xpcoffee May 19, 2024
2048289
Merge pull request #1851 from xpcoffee/clarify-from-into
marioidival May 20, 2024
a813cde
Update paragraph in src/fn/diverging.md
ruanswanepoel May 23, 2024
0fc15da
Fix minor typo in from_into.md
mckzm May 26, 2024
fe5aa22
Add precision on From/Into asymmetry to from_into.md
mckzm May 26, 2024
98b1928
Merge pull request #1855 from mckzm/src/conversion-/from_into.md-into…
marioidival May 27, 2024
dc164e0
Fix CI failure
dalance May 27, 2024
7eb2f5a
Merge pull request #1856 from dalance/fix_ci_failure
marioidival May 27, 2024
cfc5719
Update mdbook-i18n-helpers to 0.3.3
dalance May 27, 2024
4840dca
Merge pull request #1857 from dalance/update_mdbook_i18n
marioidival May 28, 2024
1d5fd89
changed incorrect variable name
931573 May 30, 2024
ccbd7b2
changed comment
931573 May 31, 2024
69cfca0
Update instruction to add language entry of TRANSLATING.md
dalance Jun 6, 2024
f62bf53
Merge pull request #1858 from 931573/master
marioidival Jun 6, 2024
d45c1d3
Merge pull request #1860 from dalance/update_translating
marioidival Jun 6, 2024
120b5ff
Fix typo
Makonede Jun 9, 2024
6b93dff
Merge pull request #1861 from Makonede/patch-1
marioidival Jun 12, 2024
80facb3
Update ja.po and mdbook-i18n-helpers
dalance Jun 17, 2024
b1d97bd
Merge pull request #1863 from dalance/update_ja
marioidival Jun 17, 2024
48ddc5a
Merge pull request #1854 from mckzm/src/conversion-/from_into.md-fix_…
marioidival Jun 30, 2024
d7fe070
Merge pull request #1853 from ruanswanepoel/patch-1
marioidival Jun 30, 2024
e6d32ac
Merge pull request #1830 from progalgo/patch-1
marioidival Jun 30, 2024
658c6c2
Merge pull request #1725 from gepbird/remove-awkward-match
marioidival Jun 30, 2024
01b3ebd
Update option_result.md
stefnotch Jul 11, 2024
89aecb6
Merge pull request #1864 from stefnotch/patch-1
marioidival Jul 11, 2024
39bf14f
Add an example of implementing the FromStr trait for Circles.
leon-matthews Jul 13, 2024
76ea853
Merge pull request #1865 from leon-matthews/fromstr-example
marioidival Jul 16, 2024
e25486f
Remove the link to Japanese translation
dalance Jul 26, 2024
e691ace
Merge pull request #1868 from dalance/update_readme
marioidival Jul 26, 2024
5ad879d
Update lifetime_bounds.md
samliok Aug 5, 2024
8f94061
Merge pull request #1869 from samliok/patch-1
marioidival Aug 6, 2024
1d24c69
Initial setup zh translation
Binlogo Aug 17, 2024
edb8c57
Translate: `src/SUMMARY.md` part
Binlogo Aug 17, 2024
26e21c4
Translate: `src/index.md` part
Binlogo Aug 17, 2024
98c95ab
Translate: `src/hello.md`
Binlogo Aug 17, 2024
e9f39d8
Translate(zh): src/hello/comment.md
Binlogo Aug 17, 2024
799660d
Translate(zh): src/hello/print.md
Binlogo Aug 18, 2024
5fc0d83
Translate(zh): src/hello/print/print_debug.md
Binlogo Aug 18, 2024
aec12e5
Translate(zh): src/hello/print/print_display.md
Binlogo Aug 18, 2024
b74bad7
Translate(zh): src/hello/print/*.md
Binlogo Aug 18, 2024
77397be
Translate(zh): `src/primitives/*.md`
Binlogo Aug 18, 2024
dd6c166
Translate(zh): `src/custom_types/structs.md`
Binlogo Aug 18, 2024
baef7a0
Translate(zh): src/custom_types/enum.md
Binlogo Aug 18, 2024
485add2
Translate(zh): `src/custom_types/enum/*.md`
Binlogo Aug 18, 2024
db8de94
Translate(zh): `src/variable_bindings/*.md`
Binlogo Aug 18, 2024
6b58e52
Translation:(zh): `src/types/*.md`
Binlogo Aug 18, 2024
6267553
Translate(zh): `src/conversion/*.md`
Binlogo Aug 18, 2024
7fe6da6
Translate(zh): `src/flow_control/*.md` - 1/n
Binlogo Aug 19, 2024
39b796b
Translate(zh): `src/flow_control/match/destructuring/*.md`
Binlogo Aug 19, 2024
5cd0fff
Translate(zh): `src/flow_control/match/*.md`
Binlogo Aug 19, 2024
e598673
Translate(zh): `src/flow_control/*.md` end
Binlogo Aug 20, 2024
863e9b5
Translate(zh): `src/fn/*/*.md`
Binlogo Aug 21, 2024
95c93b9
Translate(zh): `src/mod/**/*.md`
Binlogo Aug 21, 2024
5d50f5a
Translate(zh): `src/crates/**/*.rs`
Binlogo Aug 21, 2024
203cee6
Translate(zh): `src/cargo/deps&conventions.md`
Binlogo Aug 21, 2024
79ec054
Translate(zh): `src/cargo/*/*.md`
Binlogo Aug 22, 2024
c7dbcd8
Translate(zh): `src/attribute/**/*.md`
Binlogo Aug 22, 2024
c64dc27
Translate(zh): `src/generics/*` - 1/n
Binlogo Aug 23, 2024
e99dffb
Translate(zh): `src/generics/*`
Binlogo Aug 24, 2024
da409ca
Translate(zh): `src/scope/*`
Binlogo Aug 24, 2024
d632011
Translate(zh): `src/trait`
Binlogo Aug 25, 2024
afc67da
update primitives.md with example of array and tuple
psyklopp Aug 25, 2024
f848229
update primitives.md with example of array and tuple
psyklopp Aug 25, 2024
3c3d699
Translate(zh): `src/error/*`
Binlogo Aug 25, 2024
b54bf04
Translate(zh): `src/std/*`
Binlogo Aug 25, 2024
7bf3ae8
Fix README.md - add workflow status badge
psyklopp Aug 25, 2024
859786c
Merge pull request #1878 from psyklopp/master
marioidival Aug 26, 2024
e6dfc62
Translate(zh): `src/std/*` - continue
Binlogo Aug 27, 2024
3a9cbdb
Translate(zh): `src/std/*` - end
Binlogo Aug 28, 2024
0ad8199
Translate(zh): `src/std_misc/*` begin
Binlogo Aug 28, 2024
ec3c99c
Translate(zh): `src/std_misc/*` continue
Binlogo Aug 29, 2024
054864d
Translate(zh): `src/std_misc/*` continue
Binlogo Aug 30, 2024
e106989
Translate(zh): `src/std_misc/*` end
Binlogo Aug 31, 2024
974ec30
Translate(zh): `src/testing/*`
Binlogo Aug 31, 2024
f38015d
Translate(zh): finish 🎉
Binlogo Aug 31, 2024
901c3bb
Add TRANSLATING_ZH.md
Binlogo Aug 31, 2024
8a8b0c0
Translate(zh): update "See also"
Binlogo Aug 31, 2024
9f8948e
Translate(zh): optimize index.md
Binlogo Aug 31, 2024
5ec8443
Translation(zh): optimize continue
Binlogo Aug 31, 2024
1fa384a
Translation(zh): optimize continue
Binlogo Aug 31, 2024
4e7e3d8
Fix typo in conversion/from_into
tniessen Sep 6, 2024
1d3572c
Corrected x values for example rectangle
cyrts Sep 7, 2024
70aa7ae
Merge pull request #1884 from cyrts/issue-1883
marioidival Sep 8, 2024
c79ec34
Merge pull request #1882 from tniessen/patch-1
marioidival Sep 8, 2024
12fdafb
Translation(zh): optimize continue (:3331)
Binlogo Sep 8, 2024
c18b7d9
Translation(zh): optimize continue (:3436)
Binlogo Sep 9, 2024
3314ea6
Fix ambiguous comment on primitives > Arrays and Slices
maple19out Sep 9, 2024
3a8664e
Translation(zh): optimize continue (:3628)
Binlogo Sep 10, 2024
2ebc28a
Translation(zh): optimize continue (:4994)
Binlogo Sep 10, 2024
a96c788
Translation(zh): optimize continue (:5194)
Binlogo Sep 11, 2024
79b6a28
Translation(zh): optimize continue (:6751)
Binlogo Sep 11, 2024
1c2dd10
Translation(zh): optimize continue (:8826)
Binlogo Sep 11, 2024
dd361e2
Translation(zh): optimize continue (:9216)
Binlogo Sep 13, 2024
789576c
Translation(zh): optimize continue (:9811)
Binlogo Sep 15, 2024
76a4821
Translation(zh): optimize continue (:12478)
Binlogo Sep 15, 2024
7cfc730
Translation(zh): optimize end
Binlogo Sep 16, 2024
7fa8a2c
Prepare to add translation Chinese(zh) into official repository
Binlogo Sep 20, 2024
a138631
Merge branch 'rust-lang:master' into zh
Binlogo Sep 20, 2024
ebdc1a3
Translate(zh): fix broken link issues
Binlogo Sep 21, 2024
1d06bc7
docs(zh): fix known issues
YangFong Sep 23, 2024
c7305e6
Update iter.md
Flamenco Sep 29, 2024
00be0f9
Add .vscode/ to .gitignore
ShapelessCat Sep 29, 2024
0e22153
Improve docs
ShapelessCat Sep 29, 2024
6e0146a
Merge pull request #1886 from rust-lang-cn/zh
marioidival Sep 30, 2024
4dafcae
Merge pull request #1887 from Flamenco/patch-1
marioidival Sep 30, 2024
8bede1b
Merge pull request #1888 from ShapelessCat/minor-improvements
marioidival Sep 30, 2024
04fb7f3
`read_lines`: Use `. filter_map(Result::ok)` instead of `.flatten()`.
lgarron Oct 17, 2024
682eed9
Merge pull request #2 from rust-lang-cn/fix/doc
Binlogo Oct 17, 2024
6a65177
Fix typo in generics/new_types
breitwan Oct 25, 2024
69c0e9b
Merge pull request #1890 from lgarron/patch-1
marioidival Oct 26, 2024
2892dfa
Merge pull request #1891 from rust-lang-cn/zh
marioidival Oct 26, 2024
54cc32a
Merge pull request #1892 from breitwan/typo-fix
marioidival Oct 26, 2024
4e3881e
Merge pull request #1885 from maple19out/master
marioidival Oct 26, 2024
8bb30b9
fix(doc): correct small errors in pipes.md
bepri Oct 30, 2024
9db7860
Merge pull request #1894 from bepri/patch-1
marioidival Oct 31, 2024
9bc6832
Upgrade actions/upload-artifact action
jdno Nov 6, 2024
90a8b26
Merge pull request #1896 from jdno/upgrade-action
marioidival Nov 7, 2024
1174efc
Update mdbook theme for newer version
ehuss Nov 7, 2024
e1d1f2c
Merge pull request #1897 from ehuss/fix-theme
marioidival Nov 8, 2024
ecd5114
Fix #1900
zanedp Dec 5, 2024
7640633
Merge pull request #1901 from zanedp/patch-1
marioidival Dec 7, 2024
d2f9fb1
Mention that you're not allowed to partially move Drop types
josephcsible Dec 16, 2024
0933975
Merge pull request #1902 from josephcsible/partial-move-drop
marioidival Dec 18, 2024
7f722c8
Fix typo in static_lifetime.md
hkBst Jan 3, 2025
28b7ec6
Merge pull request #1905 from hkBst/patch-1
marioidival Jan 3, 2025
8e69e36
Fix function name in new_types.md in Japanese
yadokani389 Jan 10, 2025
054259e
Merge pull request #1907 from yadokani389/patch-1
marioidival Jan 13, 2025
658835d
add po/es.po
miguelraz Jan 31, 2025
564e2db
add es to rbe.yml and Spanish button
miguelraz Jan 31, 2025
5bda671
es translation :900
miguelraz Jan 31, 2025
ecc1d51
en to es in index.hbs
miguelraz Jan 31, 2025
7bede22
es translation to 1000
miguelraz Feb 1, 2025
877d151
es translation to 1200
miguelraz Feb 1, 2025
ca21cdb
es translation to 1500
miguelraz Feb 1, 2025
3d4b4e4
es/po.es to :1700
miguelraz Feb 1, 2025
9af042c
es translation to 2100
miguelraz Feb 1, 2025
e56a47b
fix transposed . after ending quotes
miguelraz Feb 1, 2025
021ecec
unbork failing tests
miguelraz Feb 1, 2025
7aacc6b
fix broken macro link
miguelraz Feb 1, 2025
7437669
Merge pull request #1910 from miguelraz/spanish-translation
marioidival Feb 2, 2025
bd234ec
es translation to 2162
miguelraz Feb 3, 2025
d03043f
es translation to :2600
miguelraz Feb 3, 2025
fc2c7e7
correct syntax errors
miguelraz Feb 3, 2025
612b4fd
es translation to 1:3100
miguelraz Feb 3, 2025
a349a04
Merge pull request #1911 from miguelraz/master
marioidival Feb 4, 2025
1fe268a
Add more examples @ drop.md
wowinter13 Feb 5, 2025
66543bb
Merge pull request #1912 from wowinter13/improve-drop-docs
marioidival Feb 6, 2025
64b9734
Update mdbook to 0.4.46
ehuss Mar 9, 2025
6f69823
Merge pull request #1914 from ehuss/update-mdbook
marioidival Mar 9, 2025
f7ce2ac
Grammar
RhysFonville Mar 26, 2025
d5f826a
Merge pull request #1916 from RhysFonville/patch-1
marioidival Mar 29, 2025
efbe25b
Update book.toml rename `author` field to `authors`
szabgab Mar 30, 2025
46a68fe
add example to comment.md
KennedyRichard Apr 6, 2025
e6c8e5d
Rename count to index for clarity
wazawoo Apr 7, 2025
0d7964d
Merge pull request #1920 from wazawoo/improve-clarity-on-testcase-list
marioidival Apr 7, 2025
3914d41
docs: mark illustrative 'static lifetime example with `ignore`
santoshxshrestha Apr 22, 2025
fbbf20a
Merge pull request #1923 from santoshxshrestha/patch-1
marioidival Apr 22, 2025
76cac7d
Non-tail recursive call note in testcase_linked_list
ViggoC Apr 27, 2025
53b14f4
Merge pull request #1924 from ViggoC/patch-1
marioidival Apr 29, 2025
af68928
The example is not meant to be compiled. Changed the code block ann…
santoshxshrestha Apr 29, 2025
8a8918c
Merge pull request #1926 from santoshxshrestha/patch-1
marioidival Apr 30, 2025
e6fe4b5
Fix typo in Japanese translation
zyoshoka May 11, 2025
a31d217
fix(docs): standardize on `no_run` attribute for documentation examples
santoshxshrestha May 12, 2025
c83a739
Merge pull request #1928 from zyoshoka/fix-typo-assoc-items-ja
marioidival May 13, 2025
c9d151f
Merge pull request #1929 from santoshxshrestha/patch-1
marioidival May 13, 2025
4623b5f
The example is not meant to be compiled with out passing arguments.
santoshxshrestha May 14, 2025
7898fcf
added a shorthand for the #[should_panic(expected = "msg")
santoshxshrestha May 14, 2025
4458911
Merge pull request #1931 from santoshxshrestha/patch-2
marioidival May 29, 2025
4e4a37e
Merge pull request #1930 from santoshxshrestha/patch-1
marioidival May 29, 2025
dfce4ad
Merge pull request #1919 from KennedyRichard/patch-1
marioidival May 29, 2025
21f4e32
Merge pull request #1917 from szabgab/patch-1
marioidival May 29, 2025
8a63d8b
fix(#1656): update doc tests to use `playground` as the crate name
mautamu May 30, 2025
d5ea5c6
ci: use latest mdbook
ryzhak Jun 5, 2025
17fb2b8
Merge pull request #1934 from mautamu/fix-1904
marioidival Jun 10, 2025
885cd01
Merge pull request #1935 from ryzhak/fix/1933
marioidival Jun 10, 2025
3c216f6
introduce new @media query to set a higher content width on ultra wid…
Christoph-Harms Jun 11, 2025
e579162
refactor: replace "18/9" by "2", because math
Christoph-Harms Jun 11, 2025
44afaef
doc: add doc comment
Christoph-Harms Jun 11, 2025
9baa9e8
Merge pull request #1937 from Christoph-Harms/fix/1936
marioidival Jun 11, 2025
95d44ec
Revert "introduce new @media query to set a higher content width on u…
Christoph-Harms Jun 17, 2025
05c7d8b
Merge pull request #1939 from Christoph-Harms/revert-1937-fix/1936
marioidival Jun 18, 2025
07cddd6
allow easy fixes
tshepang Jun 20, 2025
288b4e4
Merge pull request #1941 from tshepang/patch-2
marioidival Jun 25, 2025
ea92ad0
Update Chinese translations and metadata in `zh.po` file
Binlogo Jul 3, 2025
05c06d7
Update Chinese translations in `zh.po` file
Binlogo Jul 3, 2025
2dec150
Update README.md to include link for Chinese translation guide
Binlogo Jul 3, 2025
5633506
Add tracking translation progress section in TRANSLATING.md
Binlogo Jul 3, 2025
e386be5
Merge pull request #1943 from rust-lang-cn/zh
marioidival Jul 4, 2025
561cdb8
Fix typo in Japanese translation
noritada Jul 9, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Translate(zh): src/flow_control/*.md end
  • Loading branch information
Binlogo committed Aug 20, 2024
commit e598673f8fb667d9d6e3f1c1386b7bc5fed11a96
94 changes: 59 additions & 35 deletions po/zh.po
Original file line number Diff line number Diff line change
Expand Up @@ -4793,120 +4793,131 @@ msgstr ""
msgid ""
"For some use cases, when matching enums, `match` is awkward. For example:"
msgstr ""
"在某些场景中,当匹配枚举时,使用 `match` 会显得很奇怪。例如:"

#: src/flow_control/if_let.md:6 src/flow_control/while_let.md:7
#: src/flow_control/while_let.md:35
msgid "// Make `optional` of type `Option<i32>`\n"
msgstr ""
msgstr "// 创建 `Option<i32>` 类型的 `optional`\n"

#: src/flow_control/if_let.md:10
msgid "\"This is a really long string and `{:?}`\""
msgstr ""
msgstr "\"这是一个非常长的字符串和 `{:?}`\""

#: src/flow_control/if_let.md:12
msgid ""
"// ^ Required because `match` is exhaustive. Doesn't it seem\n"
" // like wasted space?\n"
msgstr ""
"// ^ 这是必要的,因为 `match` 需要穷举。不觉得这行很多余吗?\n"

#: src/flow_control/if_let.md:18
msgid ""
"`if let` is cleaner for this use case and in addition allows various failure "
"options to be specified:"
msgstr ""
"`if let` 对于这种场景更加简洁,而且还允许指定各种失败的选项:"

#: src/flow_control/if_let.md:23
msgid "// All have type `Option<i32>`\n"
msgstr ""
msgstr "// 全都是 `Option<i32>` 类型\n"

#: src/flow_control/if_let.md:28
msgid ""
"// The `if let` construct reads: \"if `let` destructures `number` into\n"
" // `Some(i)`, evaluate the block (`{}`).\n"
msgstr ""
"// `if let` 结构读作:如果 `let` 将 `number` 解构成 `Some(i)`,\n"
" // 则执行语句块(`{}`)。\n"

#: src/flow_control/if_let.md:31 src/flow_control/if_let.md:36
#: src/flow_control/if_let.md:46
msgid "\"Matched {:?}!\""
msgstr ""
msgstr "\"匹配 {:?}!\""

#: src/flow_control/if_let.md:34
msgid "// If you need to specify a failure, use an else:\n"
msgstr ""
msgstr "// 如果需要指定一个失败的情况,使用 else:\n"

#: src/flow_control/if_let.md:38
msgid "// Destructure failed. Change to the failure case.\n"
msgstr ""
msgstr "// 解构失败。切换到失败情况。\n"

#: src/flow_control/if_let.md:39 src/flow_control/if_let.md:50
msgid "\"Didn't match a number. Let's go with a letter!\""
msgstr ""
msgstr "\"没有匹配到数字。我们用一个字母吧!\""

#: src/flow_control/if_let.md:42
msgid "// Provide an altered failing condition.\n"
msgstr ""
msgstr "// 提供一个改变的失败条件。\n"

#: src/flow_control/if_let.md:47
msgid ""
"// Destructure failed. Evaluate an `else if` condition to see if the\n"
" // alternate failure branch should be taken:\n"
msgstr ""
"// 解构失败。评估 `else if` 条件,看看是否应该执行\n"
" // 替代的失败分支:\n"

#: src/flow_control/if_let.md:52
msgid "// The condition evaluated false. This branch is the default:\n"
msgstr ""
msgstr "// 条件判断为假。这个分支是默认情况:\n"

#: src/flow_control/if_let.md:53
msgid "\"I don't like letters. Let's go with an emoticon :)!\""
msgstr ""
msgstr "\"我不喜欢字母。我们用个表情符号吧 :)!\""

#: src/flow_control/if_let.md:58
msgid "In the same way, `if let` can be used to match any enum value:"
msgstr ""
msgstr "同样地,`if let` 可以用来匹配任何枚举值:"

#: src/flow_control/if_let.md:61
msgid "// Our example enum\n"
msgstr ""
msgstr "// 我们的示例枚举\n"

#: src/flow_control/if_let.md:69
msgid "// Create example variables\n"
msgstr ""
msgstr "// 创建示例变量\n"

#: src/flow_control/if_let.md:74 src/flow_control/if_let.md:110
msgid "// Variable a matches Foo::Bar\n"
msgstr ""
msgstr "// 变量 a 匹配 Foo::Bar\n"

#: src/flow_control/if_let.md:76 src/flow_control/if_let.md:113
msgid "\"a is foobar\""
msgstr ""
msgstr "\"a 是 foobar\""

#: src/flow_control/if_let.md:79
msgid ""
"// Variable b does not match Foo::Bar\n"
" // So this will print nothing\n"
msgstr ""
"// 变量 b 不匹配 Foo::Bar\n"
" // 所以这里不会打印任何东西\n"

#: src/flow_control/if_let.md:82
msgid "\"b is foobar\""
msgstr ""
msgstr "\"b 是 foobar\""

#: src/flow_control/if_let.md:85
msgid ""
"// Variable c matches Foo::Qux which has a value\n"
" // Similar to Some() in the previous example\n"
msgstr ""
"// 变量 c 匹配 Foo::Qux,它有一个值\n"
" // 类似于前面例子中的 Some()\n"

#: src/flow_control/if_let.md:88
msgid "\"c is {}\""
msgstr ""
msgstr "\"c 是 {}\""

#: src/flow_control/if_let.md:91
msgid "// Binding also works with `if let`\n"
msgstr ""
msgstr "// 绑定也可以用于 `if let`\n"

#: src/flow_control/if_let.md:93
msgid "\"c is one hundred\""
msgstr ""
msgstr "\"c 是一百\""

#: src/flow_control/if_let.md:98
msgid ""
Expand All @@ -4916,121 +4927,134 @@ msgid ""
"because instances of the enum cannot be equated, however `if let` will "
"continue to work."
msgstr ""
"`if let` 的另一个好处是它允许我们匹配非参数化的枚举变体。即使在枚举没有实现或派生 `PartialEq` 的情况下也是如此。在这种情况下,`if Foo::Bar == a` 将无法编译,因为枚举的实例无法进行相等比较,但 `if let` 仍然可以正常工作。"

#: src/flow_control/if_let.md:100
msgid "Would you like a challenge? Fix the following example to use `if let`:"
msgstr ""
msgstr "想要一个挑战吗?修复下面的例子,使用 `if let`:"

#: src/flow_control/if_let.md:103
msgid ""
"// This enum purposely neither implements nor derives PartialEq.\n"
"// That is why comparing Foo::Bar == a fails below.\n"
msgstr ""
"// 这个枚举故意既不实现也不派生 PartialEq。\n"
"// 这就是为什么下面比较 Foo::Bar == a 会失败。\n"

#: src/flow_control/if_let.md:112
msgid "// ^-- this causes a compile-time error. Use `if let` instead.\n"
msgstr ""
msgstr "// ^-- 这会导致编译时错误。使用 `if let` 来替代。\n"

#: src/flow_control/if_let.md:120
msgid ""
"[`enum`](../custom_types/enum.md), [`Option`](../std/option.md), and the [RFC]"
"(https://github.com/rust-lang/rfcs/pull/160)"
msgstr ""
"[`枚举`](../custom_types/enum.md),[`Option`](../std/option.md),以及 [RFC]"
"(https://github.com/rust-lang/rfcs/pull/160)"

#: src/flow_control/let_else.md:4
msgid "🛈 stable since: rust 1.65"
msgstr ""
msgstr "🛈 自 rust 1.65 版本起稳定"

#: src/flow_control/let_else.md:6
msgid ""
"🛈 you can target specific edition by compiling like this `rustc --"
"edition=2021 main.rs`"
msgstr ""
"🛈 你可以通过这样编译来指定特定版本 `rustc --edition=2021 main.rs`"

#: src/flow_control/let_else.md:10
msgid ""
"With `let`\\-`else`, a refutable pattern can match and bind variables in the "
"surrounding scope like a normal `let`, or else diverge (e.g. `break`, "
"`return`, `panic!`) when the pattern doesn't match."
msgstr ""
"使用 `let`\\-`else`,可反驳模式可以像普通的 `let` 一样匹配并绑定周围作用域中的变量,或者在模式不匹配时发散(例如 `break`、`return`、`panic!`)。"

#: src/flow_control/let_else.md:18 src/flow_control/let_else.md:41
#: src/std/str.md:41
msgid "' '"
msgstr ""
msgstr "' '"

#: src/flow_control/let_else.md:20 src/flow_control/let_else.md:44
msgid "\"Can't segment count item pair: '{s}'\""
msgstr ""
msgstr "\"无法分割计数项对:'{s}'\""

#: src/flow_control/let_else.md:23 src/flow_control/let_else.md:49
msgid "\"Can't parse integer: '{count_str}'\""
msgstr ""
msgstr "\"无法解析整数:'{count_str}'\""

#: src/flow_control/let_else.md:29 src/flow_control/let_else.md:54
msgid "\"3 chairs\""
msgstr ""
msgstr "\"3 chairs\""

#: src/flow_control/let_else.md:29 src/flow_control/let_else.md:54
msgid "\"chairs\""
msgstr ""
msgstr "\"chairs\""

#: src/flow_control/let_else.md:33
msgid ""
"The scope of name bindings is the main thing that makes this different from "
"`match` or `if let`\\-`else` expressions. You could previously approximate "
"these patterns with an unfortunate bit of repetition and an outer `let`:"
msgstr ""
"名称绑定的作用域是使其与 `match` 或 `if let`\\-`else` 表达式不同的主要原因。你之前可以通过一些冗余的重复和外部的 `let` 来近似这些模式:"

#: src/flow_control/let_else.md:59
msgid ""
"[option](../std/option.md), [match](./match.md), [if let](./if_let.md) and "
"the [let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html)."
msgstr ""
"[option](../std/option.md),[match](./match.md),[if let](./if_let.md) 和 "
"[let-else RFC](https://rust-lang.github.io/rfcs/3137-let-else.html)。"

#: src/flow_control/while_let.md:3
msgid ""
"Similar to `if let`, `while let` can make awkward `match` sequences more "
"tolerable. Consider the following sequence that increments `i`:"
msgstr ""
"与 `if let` 类似,`while let` 可以使别扭的 `match` 序列更易于处理。考虑下面这个递增 `i` 的序列:"

#: src/flow_control/while_let.md:9
msgid "// Repeatedly try this test.\n"
msgstr ""
msgstr "// 重复尝试这个测试。\n"

#: src/flow_control/while_let.md:13
msgid "// If `optional` destructures, evaluate the block.\n"
msgstr ""
msgstr "// 如果 `optional` 解构成功,就执行语句块。\n"

#: src/flow_control/while_let.md:16 src/flow_control/while_let.md:42
msgid "\"Greater than 9, quit!\""
msgstr ""
msgstr "\"大于 9,退出!\""

#: src/flow_control/while_let.md:19 src/flow_control/while_let.md:45
msgid "\"`i` is `{:?}`. Try again.\""
msgstr ""
msgstr "\"`i` 是 `{:?}`。再试一次。\""

#: src/flow_control/while_let.md:22
msgid "// ^ Requires 3 indentations!\n"
msgstr ""
msgstr "// ^ 需要 3 层缩进!\n"

#: src/flow_control/while_let.md:24
msgid "// Quit the loop when the destructure fails:\n"
msgstr ""
msgstr "// 当解构失败时退出循环:\n"

#: src/flow_control/while_let.md:26
msgid "// ^ Why should this be required? There must be a better way!\n"
msgstr ""
msgstr "// ^ 为什么这是必需的?一定有更好的方法!\n"

#: src/flow_control/while_let.md:31
msgid "Using `while let` makes this sequence much nicer:"
msgstr ""
msgstr "使用 `while let` 使这个序列更加优雅:"

#: src/flow_control/while_let.md:38
msgid ""
"// This reads: \"while `let` destructures `optional` into\n"
" // `Some(i)`, evaluate the block (`{}`). Else `break`.\n"
msgstr ""
"// 这读作:当 `let` 把 `optional` 解构成 `Some(i)` 时,\n"
" // 执行语句块(`{}`)。否则 `break`。\n"

#: src/flow_control/while_let.md:48
msgid ""
Expand Down