File tree 7 files changed +17
-14
lines changed
7 files changed +17
-14
lines changed Original file line number Diff line number Diff line change 95
95
# We need a toolchain that can actually build Miri, just a nightly won't do.
96
96
run : |
97
97
cargo install rustup-toolchain-install-master # TODO: cache this?
98
- ./rustup-toolchain "" -c clippy -c rustfmt
99
- - name : rustfmt (miri, ui_test)
100
- run : cargo fmt --all --check
101
- - name : rustfmt (everything else)
102
- # TODO: Add `tests` (work in progress).
103
- # Maybe change to `find . -name '*.rs'`, superseding the previous step.
104
- run : |
105
- find bench-cargo-miri benches cargo-miri test-cargo-miri -name '*.rs' \
106
- | xargs rustfmt --edition=2021 --config-path ./rustfmt.toml --check
98
+ ./rustup-toolchain "" -c clippy
99
+ - name : rustfmt
100
+ run : ./miri fmt --check
107
101
- name : clippy (miri)
108
102
run : cargo clippy --all-targets -- -D warnings
109
103
# - name: Clippy (ui_test)
Original file line number Diff line number Diff line change @@ -21,10 +21,13 @@ to the final `cargo test` invocation.
21
21
./miri run <flags>:
22
22
Build miri, set up a sysroot and then run the driver with the given <flags>.
23
23
24
- All commands also exist in a "-debug" variant (e.g. "./miri run-debug
24
+ The commands above also exist in a "-debug" variant (e.g. "./miri run-debug
25
25
<flags>") which uses debug builds instead of release builds, for faster build
26
26
times and slower execution times.
27
27
28
+ ./miri fmt <flags>:
29
+ Format all sources and tests. <flags> are passed to `rustfmt`.
30
+
28
31
ENVIRONMENT VARIABLES
29
32
30
33
MIRI_SYSROOT:
@@ -156,6 +159,10 @@ run|run-debug)
156
159
# Then run the actual command.
157
160
exec cargo run $CARGO_BUILD_FLAGS -- --sysroot " $MIRI_SYSROOT " " $@ "
158
161
;;
162
+ fmt)
163
+ find " $MIRIDIR " -not \( -name target -prune \) -name ' *.rs' \
164
+ | xargs rustfmt --edition=2021 --config-path " $MIRIDIR /rustfmt.toml" " $@ "
165
+ ;;
159
166
* )
160
167
if [ -n " $COMMAND " ]; then
161
168
echo " Unknown command: $COMMAND "
Original file line number Diff line number Diff line change 42
42
43
43
# Install and setup new toolchain.
44
44
rustup toolchain uninstall miri
45
- rustup-toolchain-install-master -n miri -c cargo -c rust-src -c rustc-dev -c llvm-tools " $@ " -- " $NEW_COMMIT "
45
+ rustup-toolchain-install-master -n miri -c cargo -c rust-src -c rustc-dev -c llvm-tools -c rustfmt " $@ " -- " $NEW_COMMIT "
46
46
rustup override set miri
47
47
48
48
# Cleanup.
Original file line number Diff line number Diff line change 1
1
#![ feature( c_unwind) ]
2
2
3
- extern "C" fn panic_abort ( ) { //~ ERROR: the program aborted
3
+ extern "C" fn panic_abort ( ) {
4
+ //~^ ERROR: the program aborted
4
5
panic ! ( )
5
6
}
6
7
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ error: abnormal termination: the program aborted execution
4
4
--> $DIR/abort-terminator.rs:LL:CC
5
5
|
6
6
LL | / extern "C" fn panic_abort() {
7
+ LL | |
7
8
LL | | panic!()
8
9
LL | | }
9
10
| |_^ the program aborted execution
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ extern crate libc;
10
10
use std:: { mem, ptr} ;
11
11
12
12
extern "C-unwind" fn thread_start ( _null : * mut libc:: c_void ) -> * mut libc:: c_void {
13
- //~^ ERROR unwinding past the topmost frame of the stack
13
+ //~^ ERROR unwinding past the topmost frame of the stack
14
14
panic ! ( )
15
15
}
16
16
Original file line number Diff line number Diff line change 2
2
// We are making scheduler assumptions here.
3
3
// compile-flags: -Zmiri-strict-provenance -Zmiri-preemption-rate=0
4
4
5
- use std:: sync:: { Condvar , Mutex , Arc } ;
5
+ use std:: sync:: { Arc , Condvar , Mutex } ;
6
6
use std:: thread;
7
7
8
8
fn check_conditional_variables_notify_all ( ) {
You can’t perform that action at this time.
0 commit comments