pub struct EnrichedCompileError {
pub error: CompileError,
pub file_path: Option<PathBuf>,
pub source_line: Option<String>,
}Expand description
CompileError + ファイルパス・該当行で強化されたエラー。
Display 実装は path:line:col: kind: msg の後に該当行と caret を付加した
gcc 風のフォーマットを出す。下流(build.rs 等)は {} で文字列化するだけで
該当行が見えるようになる。
Fields§
§error: CompileError§file_path: Option<PathBuf>§source_line: Option<String>Implementations§
Source§impl EnrichedCompileError
impl EnrichedCompileError
Sourcepub fn inner(&self) -> &CompileError
pub fn inner(&self) -> &CompileError
内側の CompileError を取得
Sourcepub fn loc(&self) -> &SourceLocation
pub fn loc(&self) -> &SourceLocation
エラー発生位置
Trait Implementations§
Source§impl Debug for EnrichedCompileError
impl Debug for EnrichedCompileError
Source§impl Display for EnrichedCompileError
impl Display for EnrichedCompileError
Source§impl Error for EnrichedCompileError
impl Error for EnrichedCompileError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<EnrichedCompileError> for InferError
impl From<EnrichedCompileError> for InferError
Source§fn from(e: EnrichedCompileError) -> Self
fn from(e: EnrichedCompileError) -> Self
Converts to this type from the input type.
Source§impl From<EnrichedCompileError> for PipelineError
impl From<EnrichedCompileError> for PipelineError
Source§fn from(e: EnrichedCompileError) -> Self
fn from(e: EnrichedCompileError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for EnrichedCompileError
impl RefUnwindSafe for EnrichedCompileError
impl Send for EnrichedCompileError
impl Sync for EnrichedCompileError
impl Unpin for EnrichedCompileError
impl UnsafeUnpin for EnrichedCompileError
impl UnwindSafe for EnrichedCompileError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more