File tree 3 files changed +6
-10
lines changed
src/test/run-make-fulldeps
3 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -82,13 +82,13 @@ endif
82
82
% : $(SOURCEDIR ) /lib/% .rs
83
83
# Compile the test library with coverage instrumentation
84
84
$(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) \
86
86
--crate-type rlib -Zinstrument-coverage
87
87
88
88
% : $(SOURCEDIR ) /% .rs
89
89
# Compile the test program with coverage instrumentation
90
90
$(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) \
92
92
-L " $( TMPDIR) " -Zinstrument-coverage
93
93
94
94
# Run it in order to generate some profiling data,
@@ -107,7 +107,7 @@ endif
107
107
# Run it through rustdoc as well to cover doctests
108
108
LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p.profraw \
109
109
$(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) \
111
111
-L "$(TMPDIR)" -Zinstrument-coverage \
112
112
-Z unstable-options --persist-doctests=$(TMPDIR)/rustdoc-$@
113
113
Original file line number Diff line number Diff line change 38
38
% : $(SOURCEDIR ) /lib/% .rs
39
39
# Compile the test library with coverage instrumentation
40
40
$(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) \
44
42
--crate-type rlib \
45
43
-Ztrim-diagnostic-paths=no \
46
44
-Zinstrument-coverage \
70
68
% : $(SOURCEDIR ) /% .rs
71
69
# Compile the test program with coverage instrumentation
72
70
$(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) \
76
72
-L " $( TMPDIR) " \
77
73
-Ztrim-diagnostic-paths=no \
78
74
-Zinstrument-coverage \
Original file line number Diff line number Diff line change 1
1
#![ allow( unused_assignments, dead_code) ]
2
2
3
- // require-rust-edition- 2018
3
+ // compile-flags: --edition= 2018
4
4
5
5
async fn c ( x : u8 ) -> u8 {
6
6
if x == 8 {
You can’t perform that action at this time.
0 commit comments