mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
Fix new clippy lints
This commit is contained in:
parent
8e324e98a1
commit
2ae3e57c26
33 changed files with 31 additions and 42 deletions
|
@ -1,8 +1,7 @@
|
|||
//!
|
||||
#![allow(clippy::type_complexity)]
|
||||
#![allow(clippy::question_mark)]
|
||||
#![allow(missing_docs)]
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![warn(missing_docs)]
|
||||
|
||||
//! The salsa crate is a crate for incremental recomputation. It
|
||||
//! permits you to define a "database" of queries with both inputs and
|
||||
|
@ -124,9 +123,9 @@ pub struct Event {
|
|||
impl Event {
|
||||
/// Returns a type that gives a user-readable debug output.
|
||||
/// Use like `println!("{:?}", index.debug(db))`.
|
||||
pub fn debug<'me, D: ?Sized>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
|
||||
pub fn debug<'me, D>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
|
||||
where
|
||||
D: plumbing::DatabaseOps,
|
||||
D: ?Sized + plumbing::DatabaseOps,
|
||||
{
|
||||
EventDebug { event: self, db }
|
||||
}
|
||||
|
@ -206,9 +205,9 @@ pub enum EventKind {
|
|||
impl EventKind {
|
||||
/// Returns a type that gives a user-readable debug output.
|
||||
/// Use like `println!("{:?}", index.debug(db))`.
|
||||
pub fn debug<'me, D: ?Sized>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
|
||||
pub fn debug<'me, D>(&'me self, db: &'me D) -> impl std::fmt::Debug + 'me
|
||||
where
|
||||
D: plumbing::DatabaseOps,
|
||||
D: ?Sized + plumbing::DatabaseOps,
|
||||
{
|
||||
EventKindDebug { kind: self, db }
|
||||
}
|
||||
|
@ -400,9 +399,9 @@ impl DatabaseKeyIndex {
|
|||
|
||||
/// Returns a type that gives a user-readable debug output.
|
||||
/// Use like `println!("{:?}", index.debug(db))`.
|
||||
pub fn debug<D: ?Sized>(self, db: &D) -> impl std::fmt::Debug + '_
|
||||
pub fn debug<D>(self, db: &D) -> impl std::fmt::Debug + '_
|
||||
where
|
||||
D: plumbing::DatabaseOps,
|
||||
D: ?Sized + plumbing::DatabaseOps,
|
||||
{
|
||||
DatabaseKeyIndexDebug { index: self, db }
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue