# Trait rustc_errors::IntoDiagArg

source ·

    pub trait IntoDiagArg {
        // Required method
        fn into_diag_arg(self) -> DiagArgValue;
    }

Expand description

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

## Required Methods§

source

#### fn into_diag_arg(self) -> DiagArgValue

## Implementations on Foreign Types§

source§

### impl IntoDiagArg for &TargetTriple

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for ParamKindOrd

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for TokenKind

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for ConstContext

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Target

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Level

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Edition

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for PanicStrategy

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for SplitDebuginfo

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for StackProtector

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for ClosureKind

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for FloatTy

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for bool

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for char

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for i8

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for i16

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for i32

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for i64

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for i128

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for isize

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for u8

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for u16

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for u32

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for u64

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for u128

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for usize

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Expr

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Path

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Visibility

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Token

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for SmallCStr

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Ident

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for MacroRulesNormalizedIdent

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Symbol

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Box<dyn Error>

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for CString

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for String

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Vec<char>

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for ParseIntError

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for NonZero<u32>

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Backtrace

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for Error

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for PathBuf

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl IntoDiagArg for ExitStatus

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

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

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

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

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

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

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

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

source§

#### fn into_diag_arg(self) -> DiagArgValue

source§

### impl<Id> IntoDiagArg for Res<Id>

source§

#### fn into_diag_arg(self) -> DiagArgValue

## Implementors§

source§

### impl IntoDiagArg for DiagArgValue

source§

### impl IntoDiagArg for rustc_errors::Level

source§

### impl IntoDiagArg for ErrCode

source§

### impl IntoDiagArg for DiagLocation

source§

### impl IntoDiagArg for DiagArgFromDisplay<'_>

source§

### impl IntoDiagArg for DiagSymbolList