diff --git a/po/es.po b/po/es.po index a68b89b2e3..bbf265a1b3 100644 --- a/po/es.po +++ b/po/es.po @@ -14221,11 +14221,11 @@ msgid "" "///\n" "/// The next lines present detailed documentation. Code blocks start with\n" "/// triple backquotes and have implicit `fn main()` inside\n" -"/// and `extern crate `. Assume we're testing `doccomments` " -"crate:\n" +"/// and `extern crate `. Assume we're testing a `playground` library\n" +"/// crate or using the Playground's Test action:\n" "///\n" "/// ```\n" -"/// let result = doccomments::add(2, 3);\n" +"/// let result = playground::add(2, 3);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" msgstr "" @@ -14240,7 +14240,7 @@ msgid "" "/// # Examples\n" "///\n" "/// ```\n" -"/// let result = doccomments::div(10, 2);\n" +"/// let result = playground::div(10, 2);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" "///\n" @@ -14250,7 +14250,7 @@ msgid "" "///\n" "/// ```rust,should_panic\n" "/// // panics on division by zero\n" -"/// doccomments::div(10, 0);\n" +"/// playground::div(10, 0);\n" "/// ```\n" msgstr "" @@ -14285,7 +14285,7 @@ msgid "" "/// # // hidden lines start with `#` symbol, but they're still compilable!\n" "/// # fn try_main() -> Result<(), String> { // line that wraps the body " "shown in doc\n" -"/// let res = doccomments::try_div(10, 2)?;\n" +"/// let res = playground::try_div(10, 2)?;\n" "/// # Ok(()) // returning from try_main\n" "/// # }\n" "/// # fn main() { // starting main that'll unwrap()\n" diff --git a/po/ja.po b/po/ja.po index 112d1506d5..d4606fd29c 100644 --- a/po/ja.po +++ b/po/ja.po @@ -16185,11 +16185,11 @@ msgid "" "///\n" "/// The next lines present detailed documentation. Code blocks start with\n" "/// triple backquotes and have implicit `fn main()` inside\n" -"/// and `extern crate `. Assume we're testing `doccomments` " -"crate:\n" +"/// and `extern crate `. Assume we're testing a `playground` library\n" +"/// crate or using the Playground's Test action:\n" "///\n" "/// ```\n" -"/// let result = doccomments::add(2, 3);\n" +"/// let result = playground::add(2, 3);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" msgstr "" @@ -16198,10 +16198,10 @@ msgstr "" "/// 以降で詳細なドキュメンテーションを記述します。コードブロックは三重のバッ" "ククォートで始まり、\n" "/// 暗黙的に`fn main()`と`extern crate <クレート名>`で囲われます。\n" -"/// `doccomments`クレートをテストしたいときには、次のように記述します。\n" +"/// `playground`クレートをテストしたいときには、次のように記述します。\n" "///\n" "/// ```\n" -"/// let result = doccomments::add(2, 3);\n" +"/// let result = playground::add(2, 3);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" @@ -16215,7 +16215,7 @@ msgid "" "/// # Examples\n" "///\n" "/// ```\n" -"/// let result = doccomments::div(10, 2);\n" +"/// let result = playground::div(10, 2);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" "///\n" @@ -16225,7 +16225,7 @@ msgid "" "///\n" "/// ```rust,should_panic\n" "/// // panics on division by zero\n" -"/// doccomments::div(10, 0);\n" +"/// playground::div(10, 0);\n" "/// ```\n" msgstr "" "/// 一般的に、ドキュメンテーションコメントは\n" @@ -16236,7 +16236,7 @@ msgstr "" "/// # Examples\n" "///\n" "/// ```\n" -"/// let result = doccomments::div(10, 2);\n" +"/// let result = playground::div(10, 2);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" "///\n" @@ -16246,7 +16246,7 @@ msgstr "" "///\n" "/// ```rust,should_panic\n" "/// // ゼロで除算するとパニックします\n" -"/// doccomments::div(10, 0);\n" +"/// playground::div(10, 0);\n" "/// ```\n" #: src/testing/doc_testing.md:52 @@ -16291,7 +16291,7 @@ msgid "" "/// # // hidden lines start with `#` symbol, but they're still compilable!\n" "/// # fn try_main() -> Result<(), String> { // line that wraps the body " "shown in doc\n" -"/// let res = doccomments::try_div(10, 2)?;\n" +"/// let res = playground::try_div(10, 2)?;\n" "/// # Ok(()) // returning from try_main\n" "/// # }\n" "/// # fn main() { // starting main that'll unwrap()\n" @@ -16305,7 +16305,7 @@ msgstr "" "/// ```\n" "/// # // 行頭に `#` を置くと行が隠されるが、コンパイルには成功します。\n" "/// # fn try_main() -> Result<(), String> { // ドキュメントの本体を囲う行\n" -"/// let res = doccomments::try_div(10, 2)?;\n" +"/// let res = playground::try_div(10, 2)?;\n" "/// # Ok(()) // try_mainから値を返します\n" "/// # }\n" "/// # fn main() { // unwrap()を実行します。\n" diff --git a/po/zh.po b/po/zh.po index 2411e9faea..866e1ba730 100644 --- a/po/zh.po +++ b/po/zh.po @@ -15454,11 +15454,11 @@ msgid "" "///\n" "/// The next lines present detailed documentation. Code blocks start with\n" "/// triple backquotes and have implicit `fn main()` inside\n" -"/// and `extern crate `. Assume we're testing `doccomments` " -"crate:\n" +"/// and `extern crate `. Assume we're testing a `playground` library\n" +"/// crate or using the Playground's Test action:\n" "///\n" "/// ```\n" -"/// let result = doccomments::add(2, 3);\n" +"/// let result = playground::add(2, 3);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" msgstr "" @@ -15466,10 +15466,10 @@ msgstr "" "///\n" "/// 接下来的几行是详细文档。代码块以三个反引号开始,\n" "/// 并隐含了 `fn main()` 函数和 `extern crate ` 声明。\n" -"/// 假设我们正在测试 `doccomments` crate:\n" +"/// 假设我们正在测试 `playground` crate:\n" "///\n" "/// ```\n" -"/// let result = doccomments::add(2, 3);\n" +"/// let result = playground::add(2, 3);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" @@ -15483,7 +15483,7 @@ msgid "" "/// # Examples\n" "///\n" "/// ```\n" -"/// let result = doccomments::div(10, 2);\n" +"/// let result = playground::div(10, 2);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" "///\n" @@ -15493,7 +15493,7 @@ msgid "" "///\n" "/// ```rust,should_panic\n" "/// // panics on division by zero\n" -"/// doccomments::div(10, 0);\n" +"/// playground::div(10, 0);\n" "/// ```\n" msgstr "" "/// 文档注释通常包含"示例"、"异常"和"错误"等部分。\n" @@ -15503,7 +15503,7 @@ msgstr "" "/// # 示例\n" "///\n" "/// ```\n" -"/// let result = doccomments::div(10, 2);\n" +"/// let result = playground::div(10, 2);\n" "/// assert_eq!(result, 5);\n" "/// ```\n" "///\n" @@ -15513,7 +15513,7 @@ msgstr "" "///\n" "/// ```rust,should_panic\n" "/// // 除以零会触发异常\n" -"/// doccomments::div(10, 0);\n" +"/// playground::div(10, 0);\n" "/// ```\n" #: src/testing/doc_testing.md:52 @@ -15549,7 +15549,7 @@ msgid "" "/// # // hidden lines start with `#` symbol, but they're still compilable!\n" "/// # fn try_main() -> Result<(), String> { // line that wraps the body shown " "in doc\n" -"/// let res = doccomments::try_div(10, 2)?;\n" +"/// let res = playground::try_div(10, 2)?;\n" "/// # Ok(()) // returning from try_main\n" "/// # }\n" "/// # fn main() { // starting main that'll unwrap()\n" @@ -15563,7 +15563,7 @@ msgstr "" "/// ```\n" "/// # // 以 `#` 开头的行在文档中是隐藏的,但它们仍然可以编译!\n" "/// # fn try_main() -> Result<(), String> { // 这行包装了文档中显示的函数体\n" -"/// let res = doccomments::try_div(10, 2)?;\n" +"/// let res = playground::try_div(10, 2)?;\n" "/// # Ok(()) // 从 try_main 返回\n" "/// # }\n" "/// # fn main() { // 开始会调用 unwrap() 的 main 函数\n" diff --git a/src/testing/doc_testing.md b/src/testing/doc_testing.md index 4015ddcdce..65cbc56f8e 100644 --- a/src/testing/doc_testing.md +++ b/src/testing/doc_testing.md @@ -11,10 +11,11 @@ as documentation tests. /// /// The next lines present detailed documentation. Code blocks start with /// triple backquotes and have implicit `fn main()` inside -/// and `extern crate `. Assume we're testing `doccomments` crate: +/// and `extern crate `. Assume we're testing a `playground` library +/// crate or using the Playground's Test action: /// /// ``` -/// let result = doccomments::add(2, 3); +/// let result = playground::add(2, 3); /// assert_eq!(result, 5); /// ``` pub fn add(a: i32, b: i32) -> i32 { @@ -28,7 +29,7 @@ pub fn add(a: i32, b: i32) -> i32 { /// # Examples /// /// ``` -/// let result = doccomments::div(10, 2); +/// let result = playground::div(10, 2); /// assert_eq!(result, 5); /// ``` /// @@ -38,7 +39,7 @@ pub fn add(a: i32, b: i32) -> i32 { /// /// ```rust,should_panic /// // panics on division by zero -/// doccomments::div(10, 0); +/// playground::div(10, 0); /// ``` pub fn div(a: i32, b: i32) -> i32 { if b == 0 { @@ -58,7 +59,7 @@ running 0 tests test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out - Doc-tests doccomments + Doc-tests playground running 3 tests test src/lib.rs - add (line 7) ... ok @@ -84,7 +85,7 @@ and `unwrap` it in hidden `main`. Sounds complicated? Here's an example: /// ``` /// # // hidden lines start with `#` symbol, but they're still compilable! /// # fn try_main() -> Result<(), String> { // line that wraps the body shown in doc -/// let res = doccomments::try_div(10, 2)?; +/// let res = playground::try_div(10, 2)?; /// # Ok(()) // returning from try_main /// # } /// # fn main() { // starting main that'll unwrap()