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: analysis_error.rs
    path of file: ./repos/prusti-dev/analysis/src
    
    the code of the file until where you have to start completion: // Â© 2021, ETH Zurich
//
// This Source Code Form is subject to the terms of the Mozilla Public
// License, v. 2.0. If a copy of the MPL was not distributed with this
// file, You can obtain one at http://mozi
    
    pub fn to_pretty_str(&self, mir: &mir::Body) -> String {
        match self {
            AnalysisError::UnsupportedStatement(location) => {
                let stmt = location_to_stmt_str(*location, mir);
                format!("Unsupported statement at {location:?}: {stmt}")
            }
            AnalysisError::NoStateBeforeLocation(location) => {
                let stmt = location_to_stmt_str(*location, mir);
                format!("There is no state before the statement at {location:?} ({stmt})")
            }
            AnalysisError::NoStateAfterBlock(bb) => {
                let terminator = &mir[*bb].terminator();
                format!(
                    "There is no state after the terminator of block {:?} ({:?})",
                    bb, terminator.kind
                )
            }
            AnalysisError::NoStateAfterSuccessor(bb_src, bb_dst) => {
                let terminator = &mir[*bb_src].terminator();
                format!(
                    "There is no state for the block {:?} after the terminator of block {:?} ({:?})",
                    bb_dst, bb_src, terminator.kind
                )
            }
        }
    }