mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-29 11:07:54 +00:00
Update Rust toolchain to 1.88 and MSRV to 1.86 (#19011)
This commit is contained in:
parent
c5995c40d3
commit
29927f2b59
59 changed files with 210 additions and 425 deletions
|
|
@ -1,10 +1,10 @@
|
|||
use crate::lint::{LintRegistry, RuleSelection};
|
||||
use ruff_db::Db as SourceDb;
|
||||
use ruff_db::files::File;
|
||||
use ruff_db::{Db as SourceDb, Upcast};
|
||||
|
||||
/// Database giving access to semantic information about a Python program.
|
||||
#[salsa::db]
|
||||
pub trait Db: SourceDb + Upcast<dyn SourceDb> {
|
||||
pub trait Db: SourceDb {
|
||||
fn is_file_open(&self, file: File) -> bool;
|
||||
|
||||
/// Resolves the rule selection for a given file.
|
||||
|
|
@ -26,12 +26,12 @@ pub(crate) mod tests {
|
|||
use super::Db;
|
||||
use crate::lint::{LintRegistry, RuleSelection};
|
||||
use anyhow::Context;
|
||||
use ruff_db::Db as SourceDb;
|
||||
use ruff_db::files::{File, Files};
|
||||
use ruff_db::system::{
|
||||
DbWithTestSystem, DbWithWritableSystem as _, System, SystemPath, SystemPathBuf, TestSystem,
|
||||
};
|
||||
use ruff_db::vendored::VendoredFileSystem;
|
||||
use ruff_db::{Db as SourceDb, Upcast};
|
||||
use ruff_python_ast::PythonVersion;
|
||||
|
||||
type Events = Arc<Mutex<Vec<salsa::Event>>>;
|
||||
|
|
@ -112,15 +112,6 @@ pub(crate) mod tests {
|
|||
}
|
||||
}
|
||||
|
||||
impl Upcast<dyn SourceDb> for TestDb {
|
||||
fn upcast(&self) -> &(dyn SourceDb + 'static) {
|
||||
self
|
||||
}
|
||||
fn upcast_mut(&mut self) -> &mut (dyn SourceDb + 'static) {
|
||||
self
|
||||
}
|
||||
}
|
||||
|
||||
#[salsa::db]
|
||||
impl Db for TestDb {
|
||||
fn is_file_open(&self, file: File) -> bool {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue