Skip to content

Commit af96441

Browse files
committed
Update clippy
1 parent 20a28d5 commit af96441

File tree

7 files changed

+31
-11
lines changed

7 files changed

+31
-11
lines changed

.travis.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
language: rust
2-
3-
rust: nightly
1+
dist: xenial
2+
language: minimal
43

54
os:
65
- linux
@@ -14,15 +13,27 @@ branches:
1413
- trying.tmp
1514
- staging.tmp
1615

16+
cache:
17+
directories:
18+
- $HOME/.cargo
19+
before_cache:
20+
- cargo install -Z install-upgrade cargo-cache --debug
21+
- cargo cache --autoclean
22+
1723
env:
1824
global:
1925
- RUST_BACKTRACE=1
2026
- secure: "OKulfkA5OGd/d1IhvBKzRkHQwMcWjzrzbimo7+5NhkUkWxndAzl+719TB3wWvIh1i2wXXrEXsyZkXM5FtRrHm55v1VKQ5ibjEvFg1w3NIg81iDyoLq186fLqywvxGkOAFPrsePPsBj5USd5xvhwwbrjO6L7/RK6Z8shBwOSc41s="
2127

28+
before_install:
29+
- curl -sSL https://sh.rustup.rs | sh -s -- -y --default-toolchain=nightly --profile=minimal
30+
- export PATH="$HOME/.cargo/bin:$PATH"
2231
install:
2332
- |
24-
if [ -z ${INTEGRATION} ]; then
25-
rustup component add rustfmt || cargo install --git https://github.com/rust-lang/rustfmt/ --force
33+
if [[ -z ${INTEGRATION} ]]; then
34+
if ! rustup component add rustfmt; then
35+
cargo install -Z install-upgrade --git https://github.com/rust-lang/rustfmt --bin rustfmt
36+
fi
2637
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
2738
. $HOME/.nvm/nvm.sh
2839
nvm install stable

appveyor.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,18 @@ branches:
1313
- auto
1414
- try
1515

16+
cache:
17+
- '%USERPROFILE%\.cargo'
18+
on_finish:
19+
- cargo install -Z install-upgrade cargo-cache --debug
20+
- cargo cache --autoclean
21+
1622
install:
1723
- curl -sSf -o rustup-init.exe https://win.rustup.rs/
18-
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly
24+
- rustup-init.exe -y --default-host %TARGET% --default-toolchain nightly --profile=minimal
1925
- set PATH=%PATH%;C:\Users\appveyor\.cargo\bin
2026
- del rust-toolchain
21-
- cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
27+
- cargo install -Z install-upgrade rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
2228
- rustup-toolchain-install-master -f -n master
2329
- rustup component add rustfmt --toolchain nightly & exit 0 # Format test handles missing rustfmt
2430
- rustup default master

clippy_lints/src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ extern crate rustc_typeck;
3737
#[allow(unused_extern_crates)]
3838
extern crate syntax;
3939
#[allow(unused_extern_crates)]
40+
extern crate syntax_expand;
41+
#[allow(unused_extern_crates)]
4042
extern crate syntax_pos;
4143

4244
use toml;

clippy_lints/src/misc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -596,7 +596,7 @@ fn is_used(cx: &LateContext<'_, '_>, expr: &Expr) -> bool {
596596
/// Tests whether an expression is in a macro expansion (e.g., something
597597
/// generated by `#[derive(...)]` or the like).
598598
fn in_attributes_expansion(expr: &Expr) -> bool {
599-
use syntax::ext::hygiene::MacroKind;
599+
use syntax_expand::hygiene::MacroKind;
600600
if expr.span.from_expansion() {
601601
let data = expr.span.ctxt().outer_expn_data();
602602

clippy_lints/src/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ use rustc_target::spec::abi::Abi;
1717
use rustc_typeck::hir_ty_to_ty;
1818
use syntax::ast::{FloatTy, IntTy, LitIntType, LitKind, UintTy};
1919
use syntax::errors::DiagnosticBuilder;
20-
use syntax::ext::base::MacroKind;
21-
use syntax::ext::hygiene::ExpnKind;
2220
use syntax::source_map::Span;
2321
use syntax::symbol::{sym, Symbol};
22+
use syntax_expand::base::MacroKind;
23+
use syntax_expand::hygiene::ExpnKind;
2424

2525
use crate::consts::{constant, Constant};
2626
use crate::utils::paths;

clippy_lints/src/utils/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ use rustc_errors::Applicability;
4343
use smallvec::SmallVec;
4444
use syntax::ast::{self, LitKind};
4545
use syntax::attr;
46-
use syntax::ext::hygiene::ExpnKind;
4746
use syntax::source_map::{Span, DUMMY_SP};
4847
use syntax::symbol::{kw, Symbol};
48+
use syntax_expand::hygiene::ExpnKind;
4949

5050
use crate::consts::{constant, Constant};
5151
use crate::reexport::*;

setup-toolchain.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ cd "$(dirname "$0")" || exit
77

88
if ! command -v rustup-toolchain-install-master > /dev/null; then
99
cargo install \
10+
-Z install-upgrade \
1011
rustup-toolchain-install-master \
1112
--bin rustup-toolchain-install-master \
1213
--debug

0 commit comments

Comments
 (0)