在Rust源代码中,rust/src/librustdoc/passes/lint/check_code_block_syntax.rs文件是rustdoc的一个lint pass(静态检查插件)。其作用是检查文档中代码块的语法是否正确。 该文件中定义了一个名为CheckCodeBlockSyntax的pass。这个pass通过实现LintPass trait来进行静态检查。具体而言,它会遍历文档树,找出所有的代码块,...
ScrapeExamplesOptions结构体存储了一些选项,用于指定提取示例代码的规则。而SyntaxRange结构体存储了示例代码在源代码中的位置范围信息,CallLocation结构体表示调用示例代码的位置,CallData结构体则用于表示示例代码的调用数据。FindCalls<'a>结构体是一个迭代器,它可以在源代码中查找调用示例代码的位置和范围。 总之,rust/...
Code in doc comments may require specific Cargo features or platforms, but currently the syntax for disabling doctests is non-obvious, verbose, and by mixing languages and syntaxes, it doesn't play well with Markdown syntax highlighting: #![cfg_attr(feature = "alloc", doc = " ```")] ...
/// It's used for macros' rendered source view, which is syntax highlighted and cannot have /// any HTML in it. pub(crate) fn visibility_to_src_with_space<'a, 'tcx: 'a>( visibility: Option<ty::Visibility<DefId>>, tcx: TyCtxt<'tcx>, item_did: DefId, is_doc_hidden: bool, ...
但是,Fully-qualified syntax(比如,<Vec as IntoIterator>::into_iter())还 没有被支持。use std::sync::mpsc::Receiver; /// This is a version of [`Receiver<T>`] with support for [`std::future`]. /// /// You can obtain a [`std::future::Future`] by calling [`Self::recv()`]....
SyntaxRange:表示示例代码在源代码中的范围,包含起始行、起始列、结束行和结束列的信息。 CallLocation:表示调用示例代码的位置,包含了文件路径和行号的信息。 CallData:表示示例代码的调用数据,包含了调用示例代码的位置和示例代码的范围。 FindCalls<'a:一个实现了Iterator trait的结构体,用于在源代码中查找调用示例代...
[allow(unused)]fn main() {/// Empty code blocks (with and without the `rust` marker): /// /// ```rust /// ``` /// /// Invalid syntax in code blocks: /// /// ```rust /// '< /// ``` pub fn foo() {}} 提示:...
Rust systems programming language - Documentation その他の rust-1.80-doc 関連パッケージ rust-1.80-doc のダウンロード アーキテクチャパッケージサイズインストールサイズファイル all21,793.7 kB590,149.0 kB[ファイル一覧]
rust-1.77-doc için bağlantılar Ubuntu Kaynakları: Hata Raporları Ubuntu Değişim Günlüğü Telif Hakkı Dosyası rustc-1.77Kaynak Paketini İndir: [rustc-1.77_1.77.2+dfsg1ubuntu1~bpo0-0ubuntu0.20.04.dsc] [rustc-1.77_1.77.2+dfsg1ubuntu1~bpo0.orig.tar.xz] ...
Meta Item Attribute Syntax 实际上描述了属性语法的基本结构。 下面表格罗列了所有 Meta Item Attribute Syntax。第一列是语法样式名称,第二列是语法看起来的样子。 Style Example MetaWord no_std MetaNameValueStr doc = "example" MetaListPaths allow(unused, clippy::inline_always) MetaListIdents macro_use(...