# Trait rustc_errors::IntoDiagnosticArg

source ·

    pub trait IntoDiagnosticArg {
        // Required method
        fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>;
    }

Expand description

Converts a value of a type into a `DiagnosticArg` (typically a field of an `IntoDiagnostic` struct). Implemented as a custom trait rather than `From` so that it is implemented on the type being converted rather than on `DiagnosticArgValue`, which enables types from other `rustc_*` crates to implement this.

## Required Methods§

source

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

## Implementations on Foreign Types§

source§

### impl IntoDiagnosticArg for &TargetTriple

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for ParamKindOrd

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for TokenKind

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for ConstContext

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Target

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Level

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Edition

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for PanicStrategy

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for SplitDebuginfo

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for StackProtector

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for ClosureKind

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for FloatTy

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for bool

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for char

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for i8

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for i16

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for i32

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for i64

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for i128

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for u8

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for u16

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for u32

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for u64

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for u128

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for usize

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Expr

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Path

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Visibility

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Token

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for SmallCStr

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Ident

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for MacroRulesNormalizedIdent

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Symbol

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Box<dyn Error>

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for CString

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for String

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for ParseIntError

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for NonZeroU32

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Backtrace

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for Error

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for PathBuf

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl IntoDiagnosticArg for ExitStatus

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl<'a> IntoDiagnosticArg for &'a str

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl<'a> IntoDiagnosticArg for &'a Path

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl<'a> IntoDiagnosticArg for Cow<'a, str>

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl<'a, T: Clone + IntoDiagnosticArg> IntoDiagnosticArg for &'a T

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

source§

### impl<Id> IntoDiagnosticArg for Res<Id>

source§

#### fn into_diagnostic_arg(self) -> DiagnosticArgValue<'static>

## Implementors§

source§

### impl IntoDiagnosticArg for rustc_errors::Level

source§

### impl IntoDiagnosticArg for DiagnosticLocation

source§

### impl IntoDiagnosticArg for DiagnosticArgFromDisplay<'_>

source§

### impl IntoDiagnosticArg for DiagnosticSymbolList

source§

### impl<'source> IntoDiagnosticArg for DiagnosticArgValue<'source>