You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: errors.rs
    path of file: ./repos/tectonic/src
    
    the code of the file until where you have to start completion: // Copyright 2016-2020 the Tectonic Project
// Licensed under the MIT License.

//! Tectonic error types and support code.

// Silence warnings due to `error-chain` using `Error::cause` instead of `Error::source`. The
// former was [deprecated in Rust 1.33](https://github.com/rust-lang/rust/pull/53533). The fix for
// `error-chain` is in <https://github.com/rust-lang-nursery/error-chain/pull/255> and will
// hopefully show up in a future version.
#![allow(deprecated)]

use error_chain::error_chain;
use std::{
    convert, ffi,
    fmt::{self, Debug, Displa
    
    fn definitely_same(&self, other: &Self) -> bool {
        match self {
            ErrorKind::Msg(ref s) => {
                if let ErrorKind::Msg(ref o) = *other {
                    s == o
                } else {
                    false
                }
            }

            // Hacky for tex-outputs test
            ErrorKind::NewStyle(ref s) => {
                if let ErrorKind::NewStyle(ref o) = *other {
                    s.to_string() == o.to_string()
                } else {
                    false
                }
            }

            _ => false,
        }
    }