mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Auto merge of #16470 - Veykril:clippy-disallow, r=lnicola
internal: Lint debug prints and disallowed types with clippy
This commit is contained in:
commit
66cec4d11a
64 changed files with 170 additions and 229 deletions
|
@ -1980,10 +1980,7 @@ fn pat_literal_to_hir(lit: &ast::LiteralPat) -> Option<(Literal, ast::Literal)>
|
|||
let ast_lit = lit.literal()?;
|
||||
let mut hir_lit: Literal = ast_lit.kind().into();
|
||||
if lit.minus_token().is_some() {
|
||||
let Some(h) = hir_lit.negate() else {
|
||||
return None;
|
||||
};
|
||||
hir_lit = h;
|
||||
hir_lit = hir_lit.negate()?;
|
||||
}
|
||||
Some((hir_lit, ast_lit))
|
||||
}
|
||||
|
|
|
@ -222,17 +222,15 @@ impl ItemScope {
|
|||
self.declarations.iter().copied()
|
||||
}
|
||||
|
||||
pub fn extern_crate_decls(
|
||||
&self,
|
||||
) -> impl Iterator<Item = ExternCrateId> + ExactSizeIterator + '_ {
|
||||
pub fn extern_crate_decls(&self) -> impl ExactSizeIterator<Item = ExternCrateId> + '_ {
|
||||
self.extern_crate_decls.iter().copied()
|
||||
}
|
||||
|
||||
pub fn use_decls(&self) -> impl Iterator<Item = UseId> + ExactSizeIterator + '_ {
|
||||
pub fn use_decls(&self) -> impl ExactSizeIterator<Item = UseId> + '_ {
|
||||
self.use_decls.iter().copied()
|
||||
}
|
||||
|
||||
pub fn impls(&self) -> impl Iterator<Item = ImplId> + ExactSizeIterator + '_ {
|
||||
pub fn impls(&self) -> impl ExactSizeIterator<Item = ImplId> + '_ {
|
||||
self.impls.iter().copied()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue