Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit d1ae590

Browse files
Merge #1044
1044: use tool_lints feature and migrate clippy warnings to have clippy:: prefix r=Xanewok a=matthiaskrgr Co-authored-by: Matthias Krüger <[email protected]>
2 parents 5b5cd9d + d3b6bf0 commit d1ae590

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/actions/hover.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -720,8 +720,11 @@ fn racer_def(ctx: &InitActionContext, span: &Span<ZeroIndexed>) -> Option<Def> {
720720
trace!("racer_def: match: {:?}", racer_match);
721721
racer_match
722722
// Avoid creating tooltip text that is exactly the item being hovered over
723-
.filter(|m| name.as_ref().map(|name| name != &m.contextstr).unwrap_or(true))
724-
.and_then(|m| racer_match_to_def(ctx, &m))
723+
.filter(|m| {
724+
name.as_ref()
725+
.map(|name| name != &m.contextstr)
726+
.unwrap_or(true)
727+
}).and_then(|m| racer_match_to_def(ctx, &m))
725728
});
726729

727730
let results = results.map_err(|_| {
@@ -932,7 +935,7 @@ pub fn tooltip(
932935
}
933936

934937
#[cfg(test)]
935-
#[allow(expect_fun_call)]
938+
#[allow(clippy::expect_fun_call)]
936939
pub mod test {
937940
use super::*;
938941

src/build/rustc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ impl<'a> CompilerCalls<'a> for RlsRustcCalls {
229229
.late_callback(codegen_backend, matches, sess, cstore, input, odir, ofile)
230230
}
231231

232-
#[allow(boxed_local)] // https://github.com/rust-lang-nursery/rust-clippy/issues/1123
232+
#[allow(clippy::boxed_local)] // https://github.com/rust-lang-nursery/rust-clippy/issues/1123
233233
fn build_controller(
234234
self: Box<Self>,
235235
sess: &Session,

src/main.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
//! functionality such as 'goto definition', symbol search, reformatting, and
1616
//! code completion, and enables renaming and refactorings.
1717
18-
#![feature(rustc_private, integer_atomics, drain_filter)]
18+
#![feature(rustc_private, integer_atomics, drain_filter, tool_lints)]
1919
#![feature(crate_visibility_modifier)] // needed for edition 2018
2020
#![allow(unknown_lints)]
21-
#![warn(clippy, rust_2018_idioms)]
21+
#![warn(clippy::all, rust_2018_idioms)]
2222
#![allow(
23-
cyclomatic_complexity,
24-
needless_pass_by_value,
25-
too_many_arguments
23+
clippy::cyclomatic_complexity,
24+
clippy::needless_pass_by_value,
25+
clippy::too_many_arguments
2626
)]
2727
// See rustc/rustc.rs in rust repo for explanation of stack adjustments.
2828
#![feature(link_args)]

src/server/dispatch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub const DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_millis(3_600_000);
3636
/// Macro enum `DispatchRequest` packing in various similar `Request` types
3737
macro_rules! define_dispatch_request_enum {
3838
($($request_type:ident),*$(,)*) => {
39-
#[allow(large_enum_variant)] // seems ok for a short lived macro-enum
39+
#[allow(clippy::large_enum_variant)] // seems ok for a short lived macro-enum
4040
crate enum DispatchRequest {
4141
$(
4242
$request_type(Request<$request_type>),

src/test/harness.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11-
#![allow(expect_fun_call)]
11+
#![allow(clippy::expect_fun_call)]
1212

1313
use std::collections::HashMap;
1414
use std::env;

0 commit comments

Comments
 (0)