File tree Expand file tree Collapse file tree 3 files changed +6
-10
lines changed
src/test/run-make-fulldeps Expand file tree Collapse file tree 3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ endif
8282% : $(SOURCEDIR ) /lib/% .rs
8383 # Compile the test library with coverage instrumentation
8484 $(RUSTC ) $(SOURCEDIR ) /lib/$@ .rs \
85- $$( grep -q '^\/\/ require-rust-edition-2018 ' $(SOURCEDIR ) /lib/$@ .rs && echo "--edition=2018" ) \
85+ $$( sed -nE 's#^// compile-flags:(.* ) # \1# p ' $(SOURCEDIR)/lib/$@.rs) \
8686 --crate-type rlib -Zinstrument-coverage
8787
8888% : $(SOURCEDIR ) /% .rs
8989 # Compile the test program with coverage instrumentation
9090 $(RUSTC ) $(SOURCEDIR ) /$@ .rs \
91- $$( grep -q '^\/\/ require-rust-edition-2018 ' $(SOURCEDIR ) /$@ .rs && echo "--edition=2018" ) \
91+ $$( sed -nE 's#^// compile-flags:(.* ) # \1# p ' $(SOURCEDIR)/$@.rs) \
9292 -L " $( TMPDIR) " -Zinstrument-coverage
9393
9494 # Run it in order to generate some profiling data,
@@ -107,7 +107,7 @@ endif
107107 # Run it through rustdoc as well to cover doctests
108108 LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p.profraw \
109109 $(RUSTDOC) --crate-name workaround_for_79771 --test $(SOURCEDIR)/$@.rs \
110- $$( grep -q '^\/\/ require-rust-edition-2018 ' $(SOURCEDIR)/$@.rs && echo "--edition=2018" ) \
110+ $$( sed -nE 's # ^// compile-flags:(.*)#\1# p ' $(SOURCEDIR)/$@.rs) \
111111 -L "$(TMPDIR)" -Zinstrument-coverage \
112112 -Z unstable-options --persist-doctests=$(TMPDIR)/rustdoc-$@
113113
Original file line number Diff line number Diff line change 3838% : $(SOURCEDIR ) /lib/% .rs
3939 # Compile the test library with coverage instrumentation
4040 $(RUSTC ) $(SOURCEDIR ) /lib/$@ .rs \
41- $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR ) /lib/$@ .rs && \
42- echo " --edition=2018" \
43- ) \
41+ $$( sed -nE 's#^// compile-flags:(.* ) # \1# p' $(SOURCEDIR)/lib/$@.rs) \
4442 --crate-type rlib \
4543 -Ztrim-diagnostic-paths=no \
4644 -Zinstrument-coverage \
7068% : $(SOURCEDIR ) /% .rs
7169 # Compile the test program with coverage instrumentation
7270 $(RUSTC ) $(SOURCEDIR ) /$@ .rs \
73- $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR ) /$@ .rs && \
74- echo " --edition=2018" \
75- ) \
71+ $$( sed -nE 's#^// compile-flags:(.* ) # \1# p' $(SOURCEDIR)/$@.rs) \
7672 -L " $( TMPDIR) " \
7773 -Ztrim-diagnostic-paths=no \
7874 -Zinstrument-coverage \
Original file line number Diff line number Diff line change 11#![ allow( unused_assignments, dead_code) ]
22
3- // require-rust-edition- 2018
3+ // compile-flags: --edition= 2018
44
55async fn c ( x : u8 ) -> u8 {
66 if x == 8 {
You can’t perform that action at this time.
0 commit comments