mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 16:24:46 +00:00
macros: change code block language
With `ignore (rust)` rather than `ignore (pseudo-Rust)` my editor highlights the code in the block, which is nicer. Signed-off-by: David Wood <david.wood@huawei.com>
This commit is contained in:
parent
b2eba058e6
commit
6e85efda22
@ -12,7 +12,7 @@ use synstructure::Structure;
|
|||||||
/// Implements `#[derive(SessionDiagnostic)]`, which allows for errors to be specified as a struct,
|
/// Implements `#[derive(SessionDiagnostic)]`, which allows for errors to be specified as a struct,
|
||||||
/// independent from the actual diagnostics emitting code.
|
/// independent from the actual diagnostics emitting code.
|
||||||
///
|
///
|
||||||
/// ```ignore (pseudo-rust)
|
/// ```ignore (rust)
|
||||||
/// # extern crate rustc_errors;
|
/// # extern crate rustc_errors;
|
||||||
/// # use rustc_errors::Applicability;
|
/// # use rustc_errors::Applicability;
|
||||||
/// # extern crate rustc_span;
|
/// # extern crate rustc_span;
|
||||||
@ -43,7 +43,7 @@ use synstructure::Structure;
|
|||||||
///
|
///
|
||||||
/// Then, later, to emit the error:
|
/// Then, later, to emit the error:
|
||||||
///
|
///
|
||||||
/// ```ignore (pseudo-rust)
|
/// ```ignore (rust)
|
||||||
/// sess.emit_err(MoveOutOfBorrowError {
|
/// sess.emit_err(MoveOutOfBorrowError {
|
||||||
/// expected,
|
/// expected,
|
||||||
/// actual,
|
/// actual,
|
||||||
@ -67,7 +67,7 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream {
|
|||||||
/// suggestions to be specified as a structs or enums, independent from the actual diagnostics
|
/// suggestions to be specified as a structs or enums, independent from the actual diagnostics
|
||||||
/// emitting code or diagnostic derives.
|
/// emitting code or diagnostic derives.
|
||||||
///
|
///
|
||||||
/// ```ignore (pseudo-rust)
|
/// ```ignore (rust)
|
||||||
/// #[derive(SessionSubdiagnostic)]
|
/// #[derive(SessionSubdiagnostic)]
|
||||||
/// pub enum ExpectedIdentifierLabel<'tcx> {
|
/// pub enum ExpectedIdentifierLabel<'tcx> {
|
||||||
/// #[label(slug = "parser-expected-identifier")]
|
/// #[label(slug = "parser-expected-identifier")]
|
||||||
@ -104,7 +104,7 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream {
|
|||||||
///
|
///
|
||||||
/// Then, later, to add the subdiagnostic:
|
/// Then, later, to add the subdiagnostic:
|
||||||
///
|
///
|
||||||
/// ```ignore (pseudo-rust)
|
/// ```ignore (rust)
|
||||||
/// diag.subdiagnostic(ExpectedIdentifierLabel::WithoutFound { span });
|
/// diag.subdiagnostic(ExpectedIdentifierLabel::WithoutFound { span });
|
||||||
///
|
///
|
||||||
/// diag.subdiagnostic(RawIdentifierSuggestion { span, applicability, ident });
|
/// diag.subdiagnostic(RawIdentifierSuggestion { span, applicability, ident });
|
||||||
|
Loading…
Reference in New Issue
Block a user