mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +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,
|
||||
/// independent from the actual diagnostics emitting code.
|
||||
///
|
||||
/// ```ignore (pseudo-rust)
|
||||
/// ```ignore (rust)
|
||||
/// # extern crate rustc_errors;
|
||||
/// # use rustc_errors::Applicability;
|
||||
/// # extern crate rustc_span;
|
||||
@ -43,7 +43,7 @@ use synstructure::Structure;
|
||||
///
|
||||
/// Then, later, to emit the error:
|
||||
///
|
||||
/// ```ignore (pseudo-rust)
|
||||
/// ```ignore (rust)
|
||||
/// sess.emit_err(MoveOutOfBorrowError {
|
||||
/// expected,
|
||||
/// 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
|
||||
/// emitting code or diagnostic derives.
|
||||
///
|
||||
/// ```ignore (pseudo-rust)
|
||||
/// ```ignore (rust)
|
||||
/// #[derive(SessionSubdiagnostic)]
|
||||
/// pub enum ExpectedIdentifierLabel<'tcx> {
|
||||
/// #[label(slug = "parser-expected-identifier")]
|
||||
@ -104,7 +104,7 @@ pub fn session_diagnostic_derive(s: Structure<'_>) -> TokenStream {
|
||||
///
|
||||
/// Then, later, to add the subdiagnostic:
|
||||
///
|
||||
/// ```ignore (pseudo-rust)
|
||||
/// ```ignore (rust)
|
||||
/// diag.subdiagnostic(ExpectedIdentifierLabel::WithoutFound { span });
|
||||
///
|
||||
/// diag.subdiagnostic(RawIdentifierSuggestion { span, applicability, ident });
|
||||
|
Loading…
Reference in New Issue
Block a user