Skip to content

Commit 23d25a3

Browse files
Enable extra warnings required by rust-lang/rust
1 parent 0ded8e7 commit 23d25a3

File tree

38 files changed

+84
-0
lines changed

38 files changed

+84
-0
lines changed

crates/base-db/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
//! base_db defines basic database traits. The concrete DB is defined by ide.
2+
3+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
4+
25
mod input;
36
mod change;
47
pub mod fixture;

crates/cfg/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! cfg defines conditional compiling options, `cfg` attribute parser and evaluator
22
3+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
4+
35
mod cfg_expr;
46
mod dnf;
57
#[cfg(test)]

crates/flycheck/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//! another compatible command (f.x. clippy) in a background thread and provide
33
//! LSP diagnostics based on the output of the command.
44
5+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
6+
57
use std::{
68
fmt, io,
79
process::{ChildStderr, ChildStdout, Command, Stdio},

crates/hir-def/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
//! Note that `hir_def` is a work in progress, so not all of the above is
88
//! actually true.
99
10+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
11+
1012
#[allow(unused)]
1113
macro_rules! eprintln {
1214
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };

crates/hir-expand/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
//! tree originates not from the text of some `FileId`, but from some macro
55
//! expansion.
66
7+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
8+
79
pub mod db;
810
pub mod ast_id_map;
911
pub mod name;

crates/hir-ty/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
//! The type system. We currently use this to infer types for completion, hover
22
//! information and various assists.
33
4+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
5+
46
#[allow(unused)]
57
macro_rules! eprintln {
68
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };

crates/hir/src/lib.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
//! from the ide with completions, hovers, etc. It is a (soft, internal) boundary:
1818
//! <https://www.tedinski.com/2018/02/06/system-boundaries.html>.
1919
20+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
2021
#![recursion_limit = "512"]
2122

2223
mod semantics;

crates/ide-assists/src/lib.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
//!
5858
//! See also this post:
5959
//! <https://rust-analyzer.github.io/blog/2020/09/28/how-to-make-a-light-bulb.html>
60+
61+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
62+
6063
#[allow(unused)]
6164
macro_rules! eprintln {
6265
($($tt:tt)*) => { stdx::eprintln!($($tt)*) };

crates/ide-completion/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
//! `completions` crate provides utilities for generating completions of user input.
22
3+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
4+
35
mod completions;
46
mod config;
57
mod context;

crates/ide-db/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
//!
33
//! It is mainly a `HirDatabase` for semantic analysis, plus a `SymbolsDatabase`, for fuzzy search.
44
5+
#![warn(rust_2018_idioms, unused_lifetimes, semicolon_in_expressions_from_macros)]
6+
57
mod apply_change;
68

79
pub mod active_parameter;

0 commit comments

Comments
 (0)