diff options
| author | Philipp Hansch <dev@phansch.net> | 2019-04-01 07:19:05 +0200 |
|---|---|---|
| committer | flip1995 <hello@philkrones.com> | 2019-04-01 20:37:05 +0200 |
| commit | b253c564d5f11888038f1e71a1d8534e0827bd4d (patch) | |
| tree | d5edc7bccf2944e17e6b884341906a392687dc62 | |
| parent | 414c34c300f3716c03ae034bd72e4db3170cf0b8 (diff) | |
| download | rust-b253c564d5f11888038f1e71a1d8534e0827bd4d.tar.gz rust-b253c564d5f11888038f1e71a1d8534e0827bd4d.zip | |
Rustup to https://github.com/rust-lang/rust/pull/58805
| -rw-r--r-- | clippy_lints/src/types.rs | 3 | ||||
| -rw-r--r-- | tests/ui/use_self.fixed | 1 | ||||
| -rw-r--r-- | tests/ui/use_self.rs | 1 | ||||
| -rw-r--r-- | tests/ui/use_self.stderr | 14 |
4 files changed, 10 insertions, 9 deletions
diff --git a/clippy_lints/src/types.rs b/clippy_lints/src/types.rs index 33dea622b35..95609d3f302 100644 --- a/clippy_lints/src/types.rs +++ b/clippy_lints/src/types.rs @@ -1533,7 +1533,7 @@ impl LintPass for CharLitAsU8 { impl<'a, 'tcx> LateLintPass<'a, 'tcx> for CharLitAsU8 { fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr) { - use syntax::ast::{LitKind, UintTy}; + use syntax::ast::LitKind; if let ExprKind::Cast(ref e, _) = expr.node { if let ExprKind::Lit(ref l) = e.node { @@ -1818,7 +1818,6 @@ impl Ord for FullInt { fn numeric_cast_precast_bounds<'a>(cx: &LateContext<'_, '_>, expr: &'a Expr) -> Option<(FullInt, FullInt)> { use std::*; - use syntax::ast::{IntTy, UintTy}; if let ExprKind::Cast(ref cast_exp, _) = expr.node { let pre_cast_ty = cx.tables.expr_ty(cast_exp); diff --git a/tests/ui/use_self.fixed b/tests/ui/use_self.fixed index 730d391848e..68af85030ab 100644 --- a/tests/ui/use_self.fixed +++ b/tests/ui/use_self.fixed @@ -239,6 +239,7 @@ mod nesting { struct Foo {} impl Foo { fn foo() { + #[allow(unused_imports)] use self::Foo; // Can't use Self here struct Bar { foo: Foo, // Foo != Self diff --git a/tests/ui/use_self.rs b/tests/ui/use_self.rs index 00824731512..7a6d415528a 100644 --- a/tests/ui/use_self.rs +++ b/tests/ui/use_self.rs @@ -239,6 +239,7 @@ mod nesting { struct Foo {} impl Foo { fn foo() { + #[allow(unused_imports)] use self::Foo; // Can't use Self here struct Bar { foo: Foo, // Foo != Self diff --git a/tests/ui/use_self.stderr b/tests/ui/use_self.stderr index 6e39a28012a..bf1f41fd64e 100644 --- a/tests/ui/use_self.stderr +++ b/tests/ui/use_self.stderr @@ -151,43 +151,43 @@ LL | use_self_expand!(); // Should lint in local macros | ------------------- in this macro invocation error: unnecessary structure name repetition - --> $DIR/use_self.rs:260:21 + --> $DIR/use_self.rs:261:21 | LL | fn baz() -> Foo { | ^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:261:13 + --> $DIR/use_self.rs:262:13 | LL | Foo {} | ^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:248:29 + --> $DIR/use_self.rs:249:29 | LL | fn bar() -> Bar { | ^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:249:21 + --> $DIR/use_self.rs:250:21 | LL | Bar { foo: Foo {} } | ^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:303:13 + --> $DIR/use_self.rs:304:13 | LL | nested::A::fun_1(); | ^^^^^^^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:304:13 + --> $DIR/use_self.rs:305:13 | LL | nested::A::A; | ^^^^^^^^^ help: use the applicable keyword: `Self` error: unnecessary structure name repetition - --> $DIR/use_self.rs:306:13 + --> $DIR/use_self.rs:307:13 | LL | nested::A {}; | ^^^^^^^^^ help: use the applicable keyword: `Self` |
