Skip to content

Commit c6071d4

Browse files
committed
Update Clippy
1 parent 03b51f2 commit c6071d4

21 files changed

+80
-361
lines changed

.github/deploy_key.enc

-1.64 KB
Binary file not shown.

.travis.yml

Lines changed: 0 additions & 154 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,7 @@ build = "build.rs"
1818
edition = "2018"
1919
publish = false
2020

21-
[badges]
22-
travis-ci = { repository = "rust-lang/rust-clippy" }
23-
appveyor = { repository = "rust-lang/rust-clippy" }
21+
# [badges]
2422
# FIXME(flip1995): Add GHA badge once rust-lang/crates.io#1838 is merged
2523

2624
[[bin]]

LICENSE-APACHE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ APPENDIX: How to apply the Apache License to your work.
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2014-2020 The Rust Project Developers
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

LICENSE-MIT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
MIT License
2+
3+
Copyright (c) 2014-2020 The Rust Project Developers
4+
15
Permission is hereby granted, free of charge, to any
26
person obtaining a copy of this software and associated
37
documentation files (the "Software"), to deal in the

README.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
# Clippy
22

3-
[![Build Status](https://travis-ci.com/rust-lang/rust-clippy.svg?branch=master)](https://travis-ci.com/rust-lang/rust-clippy)
4-
[![Windows Build status](https://ci.appveyor.com/api/projects/status/id677xpw1dguo7iw?svg=true)](https://ci.appveyor.com/project/rust-lang-libs/rust-clippy)
53
[![Clippy Test](https://github.com/rust-lang/rust-clippy/workflows/Clippy%20Test/badge.svg?branch=auto&event=push)](https://github.com/rust-lang/rust-clippy/actions?query=workflow%3A%22Clippy+Test%22+event%3Apush+branch%3Aauto)
64
[![License: MIT OR Apache-2.0](https://img.shields.io/crates/l/clippy.svg)](#license)
75

@@ -184,7 +182,7 @@ If you want to contribute to Clippy, you can find more information in [CONTRIBUT
184182

185183
## License
186184

187-
Copyright 2014-2019 The Rust Project Developers
185+
Copyright 2014-2020 The Rust Project Developers
188186

189187
Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
190188
[https://www.apache.org/licenses/LICENSE-2.0](https://www.apache.org/licenses/LICENSE-2.0)> or the MIT license

appveyor.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

ci/base-tests.sh

Lines changed: 0 additions & 55 deletions
This file was deleted.

clippy_lints/src/doc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ fn lint_for_missing_headers<'a, 'tcx>(
234234
if implements_trait(cx, ret_ty, future, &[]);
235235
if let ty::Opaque(_, subs) = ret_ty.kind;
236236
if let Some(gen) = subs.types().next();
237-
if let ty::Generator(_, subs, _) = gen.kind;
237+
if let ty::Generator(def_id, subs, _) = gen.kind;
238238
if match_type(cx, subs.as_generator().return_ty(def_id, cx.tcx), &paths::RESULT);
239239
then {
240240
span_lint(

clippy_lints/src/len_zero.rs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ fn check_trait_items(cx: &LateContext<'_, '_>, visited_trait: &Item<'_>, trait_i
147147

148148
let is_empty_method_found = current_and_super_traits
149149
.iter()
150-
.flat_map(|&i| cx.tcx.associated_items(i))
150+
.flat_map(|&i| cx.tcx.associated_items(i).in_definition_order())
151151
.any(|i| {
152152
i.kind == ty::AssocKind::Method
153153
&& i.method_has_self_argument
@@ -276,10 +276,12 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
276276

277277
/// Checks the inherent impl's items for an `is_empty(self)` method.
278278
fn has_is_empty_impl(cx: &LateContext<'_, '_>, id: DefId) -> bool {
279-
cx.tcx
280-
.inherent_impls(id)
281-
.iter()
282-
.any(|imp| cx.tcx.associated_items(*imp).iter().any(|item| is_is_empty(cx, &item)))
279+
cx.tcx.inherent_impls(id).iter().any(|imp| {
280+
cx.tcx
281+
.associated_items(*imp)
282+
.in_definition_order()
283+
.any(|item| is_is_empty(cx, &item))
284+
})
283285
}
284286

285287
let ty = &walk_ptrs_ty(cx.tables.expr_ty(expr));
@@ -288,7 +290,7 @@ fn has_is_empty(cx: &LateContext<'_, '_>, expr: &Expr<'_>) -> bool {
288290
if let Some(principal) = tt.principal() {
289291
cx.tcx
290292
.associated_items(principal.def_id())
291-
.iter()
293+
.in_definition_order()
292294
.any(|item| is_is_empty(cx, &item))
293295
} else {
294296
false

0 commit comments

Comments
 (0)