#![cfg_attr(coverage_nightly, coverage(off))]
use crate::models::unified_ast::{
ConfidenceLevel, EvidenceType, Location, ProofAnnotation, PropertyType, VerificationMethod,
};
use crate::services::proof_annotator::{
CollectionMetrics, ProofCache, ProofCollectionError, ProofCollectionResult, ProofSource,
};
use crate::services::symbol_table::SymbolTable;
use parking_lot::RwLock;
use std::future::Future;
use std::path::Path;
use std::pin::Pin;
use std::sync::Arc;
use tracing::{debug, info, warn};
use walkdir::WalkDir;
#[cfg(feature = "rust-ast")]
use syn::{Item, ItemFn, ItemImpl, Type};
#[derive(Debug, Clone)]
pub struct RustBorrowChecker {
rustc_version: String,
rustc_channel: String,
}
struct CollectionState {
annotations: Vec<(Location, ProofAnnotation)>,
errors: Vec<ProofCollectionError>,
files_processed: usize,
}
impl CollectionState {
fn new() -> Self {
Self {
annotations: Vec::new(),
errors: Vec::new(),
files_processed: 0,
}
}
}
impl RustBorrowChecker {
pub fn new() -> Result<Self, Box<dyn std::error::Error + Send + Sync>> {
let version = "1.70.0 (unknown)".to_string();
let channel = "stable".to_string();
Ok(Self {
rustc_version: version,
rustc_channel: channel,
})
}
}
impl Default for RustBorrowChecker {
fn default() -> Self {
Self::new().unwrap_or_else(|_| Self {
rustc_version: "unknown".to_string(),
rustc_channel: "stable".to_string(),
})
}
}
include!("rust_borrow_checker_analysis.rs");
include!("rust_borrow_checker_annotations.rs");
include!("rust_borrow_checker_collection.rs");
include!("rust_borrow_checker_tests.rs");