File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -90,10 +90,7 @@ matrix:
90
90
script :
91
91
- |
92
92
rm rust-toolchain
93
- cargo install rustup-toolchain-install-master --debug || echo "rustup-toolchain-install-master already installed"
94
- RUSTC_HASH=$(git ls-remote https://github.com/rust-lang/rust.git master | awk '{print $1}')
95
- travis_retry rustup-toolchain-install-master -f -n master $RUSTC_HASH
96
- rustup default master
93
+ ./setup-toolchain.sh
97
94
export LD_LIBRARY_PATH=$(rustc --print sysroot)/lib
98
95
- |
99
96
if [ -z ${INTEGRATION} ]; then
Original file line number Diff line number Diff line change @@ -73,6 +73,10 @@ an AST expression). `match_def_path()` in Clippy's `utils` module can also be us
73
73
74
74
## Writing code
75
75
76
+ Clippy depends on the current git master version of rustc, which can change rapidly. Make sure you're
77
+ working near rust-clippy's master, and use the ` setup-toolchain.sh ` script to configure the appropriate
78
+ toolchain for this directory.
79
+
76
80
[ Llogiq's blog post on lints] ( https://llogiq.github.io/2015/06/04/workflows.html ) is a nice primer
77
81
to lint-writing, though it does get into advanced stuff. Most lints consist of an implementation of
78
82
` LintPass ` with one or more of its default methods overridden. See the existing lints for examples
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ cargo +nightly fmt --all -- --check
29
29
# some lints are sensitive to formatting, exclude some files
30
30
tests_need_reformatting=" false"
31
31
# switch to nightly
32
- rustup default nightly
32
+ rustup override set nightly
33
33
# avoid loop spam and allow cmds with exit status != 0
34
34
set +ex
35
35
@@ -49,4 +49,4 @@ if [ "${tests_need_reformatting}" == "true" ] ; then
49
49
fi
50
50
51
51
# switch back to master
52
- rustup default master
52
+ rustup override set master
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+ # Set up the appropriate rustc toolchain
3
+
4
+ cd $( dirname $0 )
5
+
6
+ cargo install rustup-toolchain-install-master --debug || echo " rustup-toolchain-install-master already installed"
7
+ RUSTC_HASH=$( git ls-remote https://github.com/rust-lang/rust.git master | awk ' {print $1}' )
8
+ rustup-toolchain-install-master -f -n master $RUSTC_HASH
9
+ rustup override set master
You can’t perform that action at this time.
0 commit comments