Skip to content

Commit 1ca219e

Browse files
committed
Auto merge of #5339 - matthiaskrgr:rollup, r=<try>
Rollup up 3 pull requests changelog: none We need all of these merging at the same time.
2 parents c036c4f + 80f1e91 commit 1ca219e

File tree

12 files changed

+42
-15
lines changed

12 files changed

+42
-15
lines changed

.github/workflows/clippy_bors.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
run: |
210210
DIR=$CARGO_TARGET_DIR/debug
211211
find $DIR ! -executable -o -type d ! -path $DIR | xargs rm -rf
212+
mkdir -f $DIR/integration
212213
mv $DIR/integration-* $DIR/integration
213214
rm -rf $CARGO_TARGET_DIR/release
214215

clippy_lints/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ extern crate rustc_trait_selection;
5656
#[allow(unused_extern_crates)]
5757
extern crate rustc_typeck;
5858

59-
use rustc::session::Session;
6059
use rustc_data_structures::fx::FxHashSet;
6160
use rustc_lint::LintId;
61+
use rustc_session::Session;
6262

6363
/// Macro used to declare a Clippy lint.
6464
///

clippy_lints/src/missing_inline.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ fn check_missing_inline_attrs(cx: &LateContext<'_, '_>, attrs: &[ast::Attribute]
6969
}
7070

7171
fn is_executable(cx: &LateContext<'_, '_>) -> bool {
72-
use rustc::session::config::CrateType;
72+
use rustc_session::config::CrateType;
7373

7474
cx.tcx.sess.crate_types.get().iter().any(|t: &CrateType| match t {
7575
CrateType::Executable => true,

clippy_lints/src/trivially_copy_pass_by_ref.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ use std::cmp;
33
use crate::utils::{is_copy, is_self_ty, snippet, span_lint_and_sugg};
44
use if_chain::if_chain;
55
use matches::matches;
6-
use rustc::session::config::Config as SessionConfig;
76
use rustc::ty;
87
use rustc_errors::Applicability;
98
use rustc_hir as hir;
109
use rustc_hir::intravisit::FnKind;
1110
use rustc_hir::{Body, FnDecl, HirId, ItemKind, MutTy, Mutability, Node};
1211
use rustc_lint::{LateContext, LateLintPass};
12+
use rustc_session::config::Config as SessionConfig;
1313
use rustc_session::{declare_tool_lint, impl_lint_pass};
1414
use rustc_span::Span;
1515
use rustc_target::abi::LayoutOf;

clippy_lints/src/utils/attrs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
use rustc::session::Session;
21
use rustc_ast::ast;
32
use rustc_errors::Applicability;
3+
use rustc_session::Session;
44
use std::str::FromStr;
55

66
/// Deprecation status of attributes known by Clippy.

clippy_lints/src/utils/author.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
44
use crate::utils::{get_attr, higher};
55
use rustc::hir::map::Map;
6-
use rustc::session::Session;
76
use rustc_ast::ast::{Attribute, LitFloatType, LitKind};
87
use rustc_ast::walk_list;
98
use rustc_data_structures::fx::FxHashMap;
109
use rustc_hir as hir;
1110
use rustc_hir::intravisit::{NestedVisitorMap, Visitor};
1211
use rustc_hir::{BindingAnnotation, Block, Expr, ExprKind, Pat, PatKind, QPath, Stmt, StmtKind, TyKind};
1312
use rustc_lint::{LateContext, LateLintPass, LintContext};
13+
use rustc_session::Session;
1414
use rustc_session::{declare_lint_pass, declare_tool_lint};
1515

1616
declare_clippy_lint! {

clippy_lints/src/utils/inspector.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
//! checks for attributes
22
33
use crate::utils::get_attr;
4-
use rustc::session::Session;
54
use rustc_ast::ast::Attribute;
65
use rustc_hir as hir;
76
use rustc_hir::print;
87
use rustc_lint::{LateContext, LateLintPass, LintContext};
8+
use rustc_session::Session;
99
use rustc_session::{declare_lint_pass, declare_tool_lint};
1010

1111
declare_clippy_lint! {

clippy_lints/src/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ impl Write {
357357
};
358358
let tts = tts.clone();
359359

360-
let mut parser = parser::Parser::new(&cx.sess.parse_sess, tts, None, false, false, None);
360+
let mut parser = parser::Parser::new(&cx.sess.parse_sess, tts, false, None);
361361
let mut expr: Option<Expr> = None;
362362
if is_write {
363363
expr = match parser.parse_expr().map_err(|mut err| err.cancel()) {

tests/ui/inefficient_to_string.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,21 +35,21 @@ LL | let _: String = rrrstring.to_string();
3535
|
3636
= help: `&&std::string::String` implements `ToString` through a slower blanket impl, but `std::string::String` has a fast specialization of `ToString`
3737

38-
error: calling `to_string` on `&&std::borrow::Cow<'_, str>`
38+
error: calling `to_string` on `&&std::borrow::Cow<str>`
3939
--> $DIR/inefficient_to_string.rs:29:21
4040
|
4141
LL | let _: String = rrcow.to_string();
4242
| ^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(*rrcow).to_string()`
4343
|
44-
= help: `&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
44+
= help: `&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
4545

46-
error: calling `to_string` on `&&&std::borrow::Cow<'_, str>`
46+
error: calling `to_string` on `&&&std::borrow::Cow<str>`
4747
--> $DIR/inefficient_to_string.rs:30:21
4848
|
4949
LL | let _: String = rrrcow.to_string();
5050
| ^^^^^^^^^^^^^^^^^^ help: try dereferencing the receiver: `(**rrrcow).to_string()`
5151
|
52-
= help: `&&std::borrow::Cow<'_, str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<'_, str>` has a fast specialization of `ToString`
52+
= help: `&&std::borrow::Cow<str>` implements `ToString` through a slower blanket impl, but `std::borrow::Cow<str>` has a fast specialization of `ToString`
5353

5454
error: aborting due to 6 previous errors
5555

tests/ui/transmute.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: transmute from a type (`&'a T`) to itself
1+
error: transmute from a type (`&T`) to itself
22
--> $DIR/transmute.rs:19:20
33
|
44
LL | let _: &'a T = core::intrinsics::transmute(t);

0 commit comments

Comments
 (0)