diff options
Diffstat (limited to 'src')
33 files changed, 1246 insertions, 79 deletions
diff --git a/src/ci/docker/host-x86_64/dist-android/Dockerfile b/src/ci/docker/host-x86_64/dist-android/Dockerfile index ee727359f39..2f0496d7dd4 100644 --- a/src/ci/docker/host-x86_64/dist-android/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-android/Dockerfile @@ -9,6 +9,8 @@ RUN . /scripts/android-ndk.sh && \ download_ndk android-ndk-r15c-linux-x86_64.zip && \ make_standalone_toolchain arm 14 && \ make_standalone_toolchain x86 14 && \ + make_standalone_toolchain arm 21 && \ + make_standalone_toolchain x86 21 && \ make_standalone_toolchain arm64 21 && \ make_standalone_toolchain x86_64 21 && \ remove_ndk diff --git a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile index 7bb3cb14516..de3a99f34fc 100644 --- a/src/ci/docker/host-x86_64/dist-various-2/Dockerfile +++ b/src/ci/docker/host-x86_64/dist-various-2/Dockerfile @@ -45,10 +45,10 @@ ENV \ CC_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-gcc-8 \ CXX_armv7_unknown_linux_gnueabi=arm-linux-gnueabi-g++-8 \ AR_x86_64_fortanix_unknown_sgx=ar \ - CC_x86_64_fortanix_unknown_sgx=x86_64-fortanix-unknown-sgx-clang-11 \ - CFLAGS_x86_64_fortanix_unknown_sgx="-mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \ - CXX_x86_64_fortanix_unknown_sgx=x86_64-fortanix-unknown-sgx-clang++-11 \ - CXXFLAGS_x86_64_fortanix_unknown_sgx="-mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \ + CC_x86_64_fortanix_unknown_sgx=clang-11 \ + CFLAGS_x86_64_fortanix_unknown_sgx="-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \ + CXX_x86_64_fortanix_unknown_sgx=clang++-11 \ + CXXFLAGS_x86_64_fortanix_unknown_sgx="-D__ELF__ -isystem/usr/include/x86_64-linux-gnu -mlvi-hardening -mllvm -x86-experimental-lvi-inline-asm-hardening" \ AR_i686_unknown_freebsd=i686-unknown-freebsd11-ar \ CC_i686_unknown_freebsd=i686-unknown-freebsd11-clang \ CXX_i686_unknown_freebsd=i686-unknown-freebsd11-clang++ \ @@ -71,8 +71,6 @@ COPY host-x86_64/dist-various-2/build-solaris-toolchain.sh /tmp/ RUN /tmp/build-solaris-toolchain.sh x86_64 amd64 solaris-i386 RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc COPY host-x86_64/dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/ -COPY host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 -RUN ln -s /usr/bin/x86_64-fortanix-unknown-sgx-clang-11 /usr/bin/x86_64-fortanix-unknown-sgx-clang++-11 RUN /tmp/build-x86_64-fortanix-unknown-sgx-toolchain.sh COPY host-x86_64/dist-various-2/build-wasi-toolchain.sh /tmp/ diff --git a/src/ci/docker/host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh b/src/ci/docker/host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh deleted file mode 100755 index c4ff44c37b1..00000000000 --- a/src/ci/docker/host-x86_64/dist-various-2/x86_64-fortanix-unknown-sgx-clang-wrap.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -args=("$@") - -for i in "${!args[@]}"; do - # x86_64-fortanix-unknown-sgx doesn't have a C sysroot for things like - # stdint.h and the C++ STL. Unlike GCC, clang will not use the host's - # sysroot instead. Force it. - if [ "${args[$i]}" = "--target=x86_64-fortanix-unknown-sgx" ]; then - args[$i]="--target=x86_64-unknown-linux-gnu" - fi -done - -exec "${0/x86_64-fortanix-unknown-sgx-clang/clang}" "${args[@]}" diff --git a/src/test/run-make-fulldeps/coverage-reports/Makefile b/src/test/run-make-fulldeps/coverage-reports/Makefile index 31583eaa8fe..af75ec5e24d 100644 --- a/src/test/run-make-fulldeps/coverage-reports/Makefile +++ b/src/test/run-make-fulldeps/coverage-reports/Makefile @@ -82,13 +82,13 @@ endif %: $(SOURCEDIR)/lib/%.rs # Compile the test library with coverage instrumentation $(RUSTC) $(SOURCEDIR)/lib/$@.rs \ - $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && echo "--edition=2018" ) \ + $$( sed -nE 's#^// compile-flags:(.*)#\1# p' $(SOURCEDIR)/lib/$@.rs) \ --crate-type rlib -Zinstrument-coverage %: $(SOURCEDIR)/%.rs # Compile the test program with coverage instrumentation $(RUSTC) $(SOURCEDIR)/$@.rs \ - $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && echo "--edition=2018" ) \ + $$( sed -nE 's#^// compile-flags:(.*)#\1# p' $(SOURCEDIR)/$@.rs) \ -L "$(TMPDIR)" -Zinstrument-coverage # Run it in order to generate some profiling data, @@ -107,7 +107,7 @@ endif # Run it through rustdoc as well to cover doctests LLVM_PROFILE_FILE="$(TMPDIR)"/$@-%p.profraw \ $(RUSTDOC) --crate-name workaround_for_79771 --test $(SOURCEDIR)/$@.rs \ - $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && echo "--edition=2018" ) \ + $$( sed -nE 's#^// compile-flags:(.*)#\1# p' $(SOURCEDIR)/$@.rs) \ -L "$(TMPDIR)" -Zinstrument-coverage \ -Z unstable-options --persist-doctests=$(TMPDIR)/rustdoc-$@ diff --git a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.async.txt b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.async.txt index 824bddaa401..3f9403e6f70 100644 --- a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.async.txt +++ b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.async.txt @@ -1,6 +1,6 @@ 1| |#![allow(unused_assignments, dead_code)] 2| | - 3| |// require-rust-edition-2018 + 3| |// compile-flags: --edition=2018 4| | 5| 1|async fn c(x: u8) -> u8 { 6| 1| if x == 8 { diff --git a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.inline.txt b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.inline.txt new file mode 100644 index 00000000000..6148d89ed75 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.inline.txt @@ -0,0 +1,53 @@ + 1| |// compile-flags: -Zinline-mir + 2| | + 3| |use std::fmt::Display; + 4| | + 5| 1|fn main() { + 6| 1| permutations(&['a', 'b', 'c']); + 7| 1|} + 8| | + 9| |#[inline(always)] + 10| 1|fn permutations<T: Copy + Display>(xs: &[T]) { + 11| 1| let mut ys = xs.to_owned(); + 12| 1| permutate(&mut ys, 0); + 13| 1|} + 14| | + 15| 16|fn permutate<T: Copy + Display>(xs: &mut [T], k: usize) { + 16| 16| let n = length(xs); + 17| 16| if k == n { + 18| 6| display(xs); + 19| 10| } else if k < n { + 20| 15| for i in k..n { + ^10 + 21| 15| swap(xs, i, k); + 22| 15| permutate(xs, k + 1); + 23| 15| swap(xs, i, k); + 24| 15| } + 25| 0| } else { + 26| 0| error(); + 27| 0| } + 28| 16|} + 29| | + 30| 16|fn length<T>(xs: &[T]) -> usize { + 31| 16| xs.len() + 32| 16|} + 33| | + 34| |#[inline] + 35| 30|fn swap<T: Copy>(xs: &mut [T], i: usize, j: usize) { + 36| 30| let t = xs[i]; + 37| 30| xs[i] = xs[j]; + 38| 30| xs[j] = t; + 39| 30|} + 40| | + 41| 6|fn display<T: Display>(xs: &[T]) { + 42| 18| for x in xs { + 43| 18| print!("{}", x); + 44| 18| } + 45| 6| println!(); + 46| 6|} + 47| | + 48| |#[inline(always)] + 49| |fn error() { + 50| | panic!("error"); + 51| |} + diff --git a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.uses_crate.txt b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.uses_crate.txt index 0c28305dd77..bc2f673349a 100644 --- a/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.uses_crate.txt +++ b/src/test/run-make-fulldeps/coverage-reports/expected_show_coverage.uses_crate.txt @@ -19,12 +19,12 @@ 18| 2| println!("used_only_from_bin_crate_generic_function with {:?}", arg); 19| 2|} ------------------ - | used_crate::used_only_from_bin_crate_generic_function::<&str>: + | used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>: | 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | 18| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | 19| 1|} ------------------ - | used_crate::used_only_from_bin_crate_generic_function::<&alloc::vec::Vec<i32>>: + | used_crate::used_only_from_bin_crate_generic_function::<&str>: | 17| 1|pub fn used_only_from_bin_crate_generic_function<T: Debug>(arg: T) { | 18| 1| println!("used_only_from_bin_crate_generic_function with {:?}", arg); | 19| 1|} diff --git a/src/test/run-make-fulldeps/coverage-spanview/Makefile b/src/test/run-make-fulldeps/coverage-spanview/Makefile index cd54ac0ed4c..b0bfa7074db 100644 --- a/src/test/run-make-fulldeps/coverage-spanview/Makefile +++ b/src/test/run-make-fulldeps/coverage-spanview/Makefile @@ -38,9 +38,7 @@ endif %: $(SOURCEDIR)/lib/%.rs # Compile the test library with coverage instrumentation $(RUSTC) $(SOURCEDIR)/lib/$@.rs \ - $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/lib/$@.rs && \ - echo "--edition=2018" \ - ) \ + $$( sed -nE 's#^// compile-flags:(.*)#\1# p' $(SOURCEDIR)/lib/$@.rs) \ --crate-type rlib \ -Ztrim-diagnostic-paths=no \ -Zinstrument-coverage \ @@ -70,9 +68,7 @@ endif %: $(SOURCEDIR)/%.rs # Compile the test program with coverage instrumentation $(RUSTC) $(SOURCEDIR)/$@.rs \ - $$( grep -q '^\/\/ require-rust-edition-2018' $(SOURCEDIR)/$@.rs && \ - echo "--edition=2018" \ - ) \ + $$( sed -nE 's#^// compile-flags:(.*)#\1# p' $(SOURCEDIR)/$@.rs) \ -L "$(TMPDIR)" \ -Ztrim-diagnostic-paths=no \ -Zinstrument-coverage \ diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.display.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.display.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..6287516636e --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.display.-------.InstrumentCoverage.0.html @@ -0,0 +1,161 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.display.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.display - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 40"><span class="line"><span><span class="code even" style="--layer: 1"><span class="annotation">@0,1⦊</span>fn display<T: Display>(xs: &[T]) <span class="annotation">⦉@0,1</span></span></span><span class="code" style="--layer: 0">{</span></span> +<span class="line"><span class="code" style="--layer: 0"> for </span><span><span class="code odd" style="--layer: 1" title="42:9-42:10: @8[1]: _13 = ((_9 as Some).0: &T) +42:9-42:10: @8[3]: _14 = _13 +42:9-42:10: @8[4]: _7 = move _14 +42:9-42:10: @8[5]: _8 = const () +42:9-42:10: @8[13]: FakeRead(ForLet, _16)"><span class="annotation">@6,8,9,10,11⦊</span>x<span class="annotation">⦉@6,8,9,10,11</span></span></span><span class="code" style="--layer: 0"> in </span><span><span class="code odd" style="--layer: 1" title="42:14-42:16: @8[12]: _16 = _7 +43:16-43:20: @8[20]: _47 = const display::<T>::promoted[2] +43:16-43:20: @8[21]: _22 = &(*_47) +43:16-43:20: @8[22]: _21 = &(*_22) +43:16-43:20: @8[23]: _20 = move _21 as &[&str] (Pointer(Unsize)) +43:22-43:23: @8[31]: _29 = &_16 +43:9-43:25: @8[32]: _28 = (move _29,) +43:9-43:25: @8[34]: FakeRead(ForMatchedPlace, _28) +43:9-43:25: @8[36]: _30 = (_28.0: &&T) +43:9-43:25: @8[39]: _32 = &(*_30) +43:9-43:25: @8[41]: _33 = <&T as std::fmt::Display>::fmt as for<'r, 's, 't0> fn(&'r &T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)) +43:9-43:25: @8.Call: _31 = std::fmt::ArgumentV1::new::<&T>(move _32, move _33) -> [return: bb9, unwind: bb14] +43:9-43:25: @9[2]: _27 = [move _31] +43:9-43:25: @9[5]: _26 = &_27 +43:9-43:25: @9[6]: _25 = &(*_26) +43:9-43:25: @9[7]: _24 = move _25 as &[std::fmt::ArgumentV1] (Pointer(Unsize)) +43:9-43:25: @9.Call: _19 = std::fmt::Arguments::new_v1(move _20, move _24) -> [return: bb10, unwind: bb14] +43:9-43:25: @10.Call: _18 = std::io::_print(move _19) -> [return: bb11, unwind: bb14] +42:17-44:6: @11[6]: _17 = const ()"><span class="annotation">@6,8,9,10,11⦊</span>xs {</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="42:14-42:16: @8[12]: _16 = _7 +43:16-43:20: @8[20]: _47 = const display::<T>::promoted[2] +43:16-43:20: @8[21]: _22 = &(*_47) +43:16-43:20: @8[22]: _21 = &(*_22) +43:16-43:20: @8[23]: _20 = move _21 as &[&str] (Pointer(Unsize)) +43:22-43:23: @8[31]: _29 = &_16 +43:9-43:25: @8[32]: _28 = (move _29,) +43:9-43:25: @8[34]: FakeRead(ForMatchedPlace, _28) +43:9-43:25: @8[36]: _30 = (_28.0: &&T) +43:9-43:25: @8[39]: _32 = &(*_30) +43:9-43:25: @8[41]: _33 = <&T as std::fmt::Display>::fmt as for<'r, 's, 't0> fn(&'r &T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)) +43:9-43:25: @8.Call: _31 = std::fmt::ArgumentV1::new::<&T>(move _32, move _33) -> [return: bb9, unwind: bb14] +43:9-43:25: @9[2]: _27 = [move _31] +43:9-43:25: @9[5]: _26 = &_27 +43:9-43:25: @9[6]: _25 = &(*_26) +43:9-43:25: @9[7]: _24 = move _25 as &[std::fmt::ArgumentV1] (Pointer(Unsize)) +43:9-43:25: @9.Call: _19 = std::fmt::Arguments::new_v1(move _20, move _24) -> [return: bb10, unwind: bb14] +43:9-43:25: @10.Call: _18 = std::io::_print(move _19) -> [return: bb11, unwind: bb14] +42:17-44:6: @11[6]: _17 = const ()"> print!("{}", x);</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="42:14-42:16: @8[12]: _16 = _7 +43:16-43:20: @8[20]: _47 = const display::<T>::promoted[2] +43:16-43:20: @8[21]: _22 = &(*_47) +43:16-43:20: @8[22]: _21 = &(*_22) +43:16-43:20: @8[23]: _20 = move _21 as &[&str] (Pointer(Unsize)) +43:22-43:23: @8[31]: _29 = &_16 +43:9-43:25: @8[32]: _28 = (move _29,) +43:9-43:25: @8[34]: FakeRead(ForMatchedPlace, _28) +43:9-43:25: @8[36]: _30 = (_28.0: &&T) +43:9-43:25: @8[39]: _32 = &(*_30) +43:9-43:25: @8[41]: _33 = <&T as std::fmt::Display>::fmt as for<'r, 's, 't0> fn(&'r &T, &'s mut std::fmt::Formatter<'t0>) -> std::result::Result<(), std::fmt::Error> (Pointer(ReifyFnPointer)) +43:9-43:25: @8.Call: _31 = std::fmt::ArgumentV1::new::<&T>(move _32, move _33) -> [return: bb9, unwind: bb14] +43:9-43:25: @9[2]: _27 = [move _31] +43:9-43:25: @9[5]: _26 = &_27 +43:9-43:25: @9[6]: _25 = &(*_26) +43:9-43:25: @9[7]: _24 = move _25 as &[std::fmt::ArgumentV1] (Pointer(Unsize)) +43:9-43:25: @9.Call: _19 = std::fmt::Arguments::new_v1(move _20, move _24) -> [return: bb10, unwind: bb14] +43:9-43:25: @10.Call: _18 = std::io::_print(move _19) -> [return: bb11, unwind: bb14] +42:17-44:6: @11[6]: _17 = const ()"> }<span class="annotation">⦉@6,8,9,10,11</span></span></span><span class="code" style="--layer: 0"></span></span> +<span class="line"><span class="code" style="--layer: 0"> </span><span><span class="code even" style="--layer: 1" title="45:5-45:16: @5[13]: _46 = const display::<T>::promoted[1] +45:5-45:16: @5[14]: _38 = &(*_46) +45:5-45:16: @5[15]: _37 = &(*_38) +45:5-45:16: @5[16]: _36 = move _37 as &[&str] (Pointer(Unsize)) +45:5-45:16: @5[22]: _44 = () +45:5-45:16: @5[23]: FakeRead(ForMatchedPlace, _44) +45:5-45:16: @5[24]: _45 = const display::<T>::promoted[0] +45:5-45:16: @5[25]: _42 = &(*_45) +45:5-45:16: @5[26]: _41 = &(*_42) +45:5-45:16: @5[27]: _40 = move _41 as &[std::fmt::ArgumentV1] (Pointer(Unsize)) +45:5-45:16: @5.Call: _35 = std::fmt::Arguments::new_v1(move _36, move _40) -> [return: bb12, unwind: bb14] +45:5-45:16: @12.Call: _34 = std::io::_print(move _35) -> [return: bb13, unwind: bb14] +46:2-46:2: @13.Return: return"><span class="annotation">@5,12,13⦊</span>println!();</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="45:5-45:16: @5[13]: _46 = const display::<T>::promoted[1] +45:5-45:16: @5[14]: _38 = &(*_46) +45:5-45:16: @5[15]: _37 = &(*_38) +45:5-45:16: @5[16]: _36 = move _37 as &[&str] (Pointer(Unsize)) +45:5-45:16: @5[22]: _44 = () +45:5-45:16: @5[23]: FakeRead(ForMatchedPlace, _44) +45:5-45:16: @5[24]: _45 = const display::<T>::promoted[0] +45:5-45:16: @5[25]: _42 = &(*_45) +45:5-45:16: @5[26]: _41 = &(*_42) +45:5-45:16: @5[27]: _40 = move _41 as &[std::fmt::ArgumentV1] (Pointer(Unsize)) +45:5-45:16: @5.Call: _35 = std::fmt::Arguments::new_v1(move _36, move _40) -> [return: bb12, unwind: bb14] +45:5-45:16: @12.Call: _34 = std::io::_print(move _35) -> [return: bb13, unwind: bb14] +46:2-46:2: @13.Return: return">}<span class="annotation">⦉@5,12,13</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.error.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.error.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..bbf19c3e446 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.error.-------.InstrumentCoverage.0.html @@ -0,0 +1,79 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.error.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.error - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 48"><span class="line"><span><span class="code even" style="--layer: 1" title="50:5-50:21: @0.Call: std::rt::begin_panic::<&str>(const "error") -> bb1 +49:12-51:2: @1.Resume: resume"><span class="annotation">@0,1⦊</span>fn error() {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="50:5-50:21: @0.Call: std::rt::begin_panic::<&str>(const "error") -> bb1 +49:12-51:2: @1.Resume: resume"> panic!("error");</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="50:5-50:21: @0.Call: std::rt::begin_panic::<&str>(const "error") -> bb1 +49:12-51:2: @1.Resume: resume">}<span class="annotation">⦉@0,1</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.length.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.length.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..8e8efb6d9f6 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.length.-------.InstrumentCoverage.0.html @@ -0,0 +1,82 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.length.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.length - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 29"><span class="line"><span><span class="code even" style="--layer: 1" title="31:5-31:7: @0[1]: _2 = &(*_1) +31:5-31:13: @0.Call: _0 = core::slice::<impl [T]>::len(move _2) -> [return: bb1, unwind: bb2] +32:2-32:2: @1.Return: return"><span class="annotation">@0,1⦊</span>fn length<T>(xs: &[T]) -> usize {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="31:5-31:7: @0[1]: _2 = &(*_1) +31:5-31:13: @0.Call: _0 = core::slice::<impl [T]>::len(move _2) -> [return: bb1, unwind: bb2] +32:2-32:2: @1.Return: return"> xs.len()</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="31:5-31:7: @0[1]: _2 = &(*_1) +31:5-31:13: @0.Call: _0 = core::slice::<impl [T]>::len(move _2) -> [return: bb1, unwind: bb2] +32:2-32:2: @1.Return: return">}<span class="annotation">⦉@0,1</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.main.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.main.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..4ec2e9beede --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.main.-------.InstrumentCoverage.0.html @@ -0,0 +1,94 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.main.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.main - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 4"><span class="line"><span><span class="code even" style="--layer: 1" title="6:18-6:34: @0[4]: _6 = const main::promoted[0] +6:18-6:34: @0[5]: _4 = &(*_6) +6:18-6:34: @0[6]: _3 = &(*_4) +6:18-6:34: @0[7]: _2 = move _3 as &[char] (Pointer(Unsize)) +6:5-6:35: @0.Call: _1 = permutations::<char>(move _2) -> [return: bb1, unwind: bb2] +5:11-7:2: @1[3]: _0 = const () +7:2-7:2: @1.Return: return"><span class="annotation">@0,1⦊</span>fn main() {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="6:18-6:34: @0[4]: _6 = const main::promoted[0] +6:18-6:34: @0[5]: _4 = &(*_6) +6:18-6:34: @0[6]: _3 = &(*_4) +6:18-6:34: @0[7]: _2 = move _3 as &[char] (Pointer(Unsize)) +6:5-6:35: @0.Call: _1 = permutations::<char>(move _2) -> [return: bb1, unwind: bb2] +5:11-7:2: @1[3]: _0 = const () +7:2-7:2: @1.Return: return"> permutations(&['a', 'b', 'c']);</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="6:18-6:34: @0[4]: _6 = const main::promoted[0] +6:18-6:34: @0[5]: _4 = &(*_6) +6:18-6:34: @0[6]: _3 = &(*_4) +6:18-6:34: @0[7]: _2 = move _3 as &[char] (Pointer(Unsize)) +6:5-6:35: @0.Call: _1 = permutations::<char>(move _2) -> [return: bb1, unwind: bb2] +5:11-7:2: @1[3]: _0 = const () +7:2-7:2: @1.Return: return">}<span class="annotation">⦉@0,1</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutate.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutate.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..fd72973ccd0 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutate.-------.InstrumentCoverage.0.html @@ -0,0 +1,183 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutate.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.permutate - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 14"><span class="line"><span><span class="code even" style="--layer: 1" title="16:20-16:22: @0[2]: _4 = &(*_1) +16:13-16:23: @0.Call: _3 = length::<T>(move _4) -> [return: bb1, unwind: bb22] +16:9-16:10: @1[1]: FakeRead(ForLet, _3) +17:8-17:9: @1[4]: _6 = _2 +17:13-17:14: @1[6]: _7 = _3 +17:8-17:14: @1[7]: _5 = Eq(move _6, move _7)"><span class="annotation">@0,1⦊</span>fn permutate<T: Copy + Display>(xs: &mut [T], k: usize) {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="16:20-16:22: @0[2]: _4 = &(*_1) +16:13-16:23: @0.Call: _3 = length::<T>(move _4) -> [return: bb1, unwind: bb22] +16:9-16:10: @1[1]: FakeRead(ForLet, _3) +17:8-17:9: @1[4]: _6 = _2 +17:13-17:14: @1[6]: _7 = _3 +17:8-17:14: @1[7]: _5 = Eq(move _6, move _7)"> let n = length(xs);</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="16:20-16:22: @0[2]: _4 = &(*_1) +16:13-16:23: @0.Call: _3 = length::<T>(move _4) -> [return: bb1, unwind: bb22] +16:9-16:10: @1[1]: FakeRead(ForLet, _3) +17:8-17:9: @1[4]: _6 = _2 +17:13-17:14: @1[6]: _7 = _3 +17:8-17:14: @1[7]: _5 = Eq(move _6, move _7)"> if k == n<span class="annotation">⦉@0,1</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="18:17-18:19: @2[2]: _9 = &(*_1) +18:9-18:20: @2.Call: _8 = display::<T>(move _9) -> [return: bb4, unwind: bb22] +17:15-19:6: @4[2]: _0 = const ()"><span class="annotation">@2,4⦊</span>{</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="18:17-18:19: @2[2]: _9 = &(*_1) +18:9-18:20: @2.Call: _8 = display::<T>(move _9) -> [return: bb4, unwind: bb22] +17:15-19:6: @4[2]: _0 = const ()"> display(xs);</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="18:17-18:19: @2[2]: _9 = &(*_1) +18:9-18:20: @2.Call: _8 = display::<T>(move _9) -> [return: bb4, unwind: bb22] +17:15-19:6: @4[2]: _0 = const ()"> }<span class="annotation">⦉@2,4</span></span></span><span class="code" style="--layer: 0"> else if </span><span><span class="code even" style="--layer: 1" title="19:15-19:16: @3[2]: _11 = _2 +19:19-19:20: @3[4]: _12 = _3 +19:15-19:20: @3[5]: _10 = Lt(move _11, move _12)"><span class="annotation">@3⦊</span>k < n<span class="annotation">⦉@3</span></span></span><span class="code" style="--layer: 0"> {</span></span> +<span class="line"><span class="code" style="--layer: 0"> for </span><span><span class="code odd" style="--layer: 1" title="20:13-20:14: @14[1]: _25 = ((_21 as Some).0: usize) +20:13-20:14: @14[3]: _26 = _25 +20:13-20:14: @14[4]: _19 = move _26 +20:13-20:14: @14[5]: _20 = const () +20:13-20:14: @14[13]: FakeRead(ForLet, _28)"><span class="annotation">@12,14,15,16,17,18⦊</span>i<span class="annotation">⦉@12,14,15,16,17,18</span></span></span><span class="code" style="--layer: 0"> in </span><span><span class="code even" style="--layer: 1" title="20:18-20:19: @5[3]: _15 = _2 +20:21-20:22: @5[5]: _16 = _3"><span class="annotation">@5,7⦊</span>k..n<span class="annotation">⦉@5,7</span></span></span><span class="code" style="--layer: 0"> </span><span><span class="code odd" style="--layer: 1" title="21:18-21:20: @14[17]: _31 = &mut (*_1) +21:22-21:23: @14[19]: _32 = _28 +21:25-21:26: @14[21]: _33 = _2 +21:13-21:27: @14.Call: _30 = swap::<T>(move _31, move _32, move _33) -> [return: bb15, unwind: bb22] +22:23-22:25: @15[6]: _35 = &mut (*_1) +22:27-22:28: @15[9]: _37 = _2 +22:27-22:32: @15[10]: _38 = CheckedAdd(_37, const 1_usize) +22:27-22:32: @16[0]: _36 = move (_38.0: usize) +22:13-22:33: @16.Call: _34 = permutate::<T>(move _35, move _36) -> [return: bb17, unwind: bb22] +23:18-23:20: @17[5]: _40 = &mut (*_1) +23:22-23:23: @17[7]: _41 = _28 +23:25-23:26: @17[9]: _42 = _2 +23:13-23:27: @17.Call: _39 = swap::<T>(move _40, move _41, move _42) -> [return: bb18, unwind: bb22] +20:23-24:10: @18[4]: _29 = const ()"><span class="annotation">@12,14,15,16,17,18⦊</span>{</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:20: @14[17]: _31 = &mut (*_1) +21:22-21:23: @14[19]: _32 = _28 +21:25-21:26: @14[21]: _33 = _2 +21:13-21:27: @14.Call: _30 = swap::<T>(move _31, move _32, move _33) -> [return: bb15, unwind: bb22] +22:23-22:25: @15[6]: _35 = &mut (*_1) +22:27-22:28: @15[9]: _37 = _2 +22:27-22:32: @15[10]: _38 = CheckedAdd(_37, const 1_usize) +22:27-22:32: @16[0]: _36 = move (_38.0: usize) +22:13-22:33: @16.Call: _34 = permutate::<T>(move _35, move _36) -> [return: bb17, unwind: bb22] +23:18-23:20: @17[5]: _40 = &mut (*_1) +23:22-23:23: @17[7]: _41 = _28 +23:25-23:26: @17[9]: _42 = _2 +23:13-23:27: @17.Call: _39 = swap::<T>(move _40, move _41, move _42) -> [return: bb18, unwind: bb22] +20:23-24:10: @18[4]: _29 = const ()"> swap(xs, i, k);</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:20: @14[17]: _31 = &mut (*_1) +21:22-21:23: @14[19]: _32 = _28 +21:25-21:26: @14[21]: _33 = _2 +21:13-21:27: @14.Call: _30 = swap::<T>(move _31, move _32, move _33) -> [return: bb15, unwind: bb22] +22:23-22:25: @15[6]: _35 = &mut (*_1) +22:27-22:28: @15[9]: _37 = _2 +22:27-22:32: @15[10]: _38 = CheckedAdd(_37, const 1_usize) +22:27-22:32: @16[0]: _36 = move (_38.0: usize) +22:13-22:33: @16.Call: _34 = permutate::<T>(move _35, move _36) -> [return: bb17, unwind: bb22] +23:18-23:20: @17[5]: _40 = &mut (*_1) +23:22-23:23: @17[7]: _41 = _28 +23:25-23:26: @17[9]: _42 = _2 +23:13-23:27: @17.Call: _39 = swap::<T>(move _40, move _41, move _42) -> [return: bb18, unwind: bb22] +20:23-24:10: @18[4]: _29 = const ()"> permutate(xs, k + 1);</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:20: @14[17]: _31 = &mut (*_1) +21:22-21:23: @14[19]: _32 = _28 +21:25-21:26: @14[21]: _33 = _2 +21:13-21:27: @14.Call: _30 = swap::<T>(move _31, move _32, move _33) -> [return: bb15, unwind: bb22] +22:23-22:25: @15[6]: _35 = &mut (*_1) +22:27-22:28: @15[9]: _37 = _2 +22:27-22:32: @15[10]: _38 = CheckedAdd(_37, const 1_usize) +22:27-22:32: @16[0]: _36 = move (_38.0: usize) +22:13-22:33: @16.Call: _34 = permutate::<T>(move _35, move _36) -> [return: bb17, unwind: bb22] +23:18-23:20: @17[5]: _40 = &mut (*_1) +23:22-23:23: @17[7]: _41 = _28 +23:25-23:26: @17[9]: _42 = _2 +23:13-23:27: @17.Call: _39 = swap::<T>(move _40, move _41, move _42) -> [return: bb18, unwind: bb22] +20:23-24:10: @18[4]: _29 = const ()"> swap(xs, i, k);</span></span> +<span class="line"><span class="code odd" style="--layer: 1" title="21:18-21:20: @14[17]: _31 = &mut (*_1) +21:22-21:23: @14[19]: _32 = _28 +21:25-21:26: @14[21]: _33 = _2 +21:13-21:27: @14.Call: _30 = swap::<T>(move _31, move _32, move _33) -> [return: bb15, unwind: bb22] +22:23-22:25: @15[6]: _35 = &mut (*_1) +22:27-22:28: @15[9]: _37 = _2 +22:27-22:32: @15[10]: _38 = CheckedAdd(_37, const 1_usize) +22:27-22:32: @16[0]: _36 = move (_38.0: usize) +22:13-22:33: @16.Call: _34 = permutate::<T>(move _35, move _36) -> [return: bb17, unwind: bb22] +23:18-23:20: @17[5]: _40 = &mut (*_1) +23:22-23:23: @17[7]: _41 = _28 +23:25-23:26: @17[9]: _42 = _2 +23:13-23:27: @17.Call: _39 = swap::<T>(move _40, move _41, move _42) -> [return: bb18, unwind: bb22] +20:23-24:10: @18[4]: _29 = const ()"> }<span class="annotation">⦉@12,14,15,16,17,18</span></span></span><span class="code" style="--layer: 0"></span></span> +<span class="line"><span class="code" style="--layer: 0"> } else </span><span><span class="code even" style="--layer: 1" title="26:9-26:16: @6.Call: _43 = error() -> [return: bb19, unwind: bb22] +25:12-27:6: @19[1]: _0 = const ()"><span class="annotation">@6,19⦊</span>{</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="26:9-26:16: @6.Call: _43 = error() -> [return: bb19, unwind: bb22] +25:12-27:6: @19[1]: _0 = const ()"> error();</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="26:9-26:16: @6.Call: _43 = error() -> [return: bb19, unwind: bb22] +25:12-27:6: @19[1]: _0 = const ()"> }<span class="annotation">⦉@6,19</span></span></span><span class="code" style="--layer: 0"></span></span> +<span class="line"><span class="code" style="--layer: 0">}</span><span><span class="code odd" style="--layer: 1" title="28:2-28:2: @21.Return: return"><span class="annotation">@21⦊</span>‸<span class="annotation">⦉@21</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutations.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutations.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..4bfd22f3cd9 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutations.-------.InstrumentCoverage.0.html @@ -0,0 +1,113 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.permutations.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.permutations - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 9"><span class="line"><span><span class="code even" style="--layer: 1" title="11:18-11:20: @0[2]: _3 = &(*_1) +11:18-11:31: @0.Call: _2 = <[T] as std::borrow::ToOwned>::to_owned(move _3) -> [return: bb1, unwind: bb6] +11:9-11:15: @1[1]: FakeRead(ForLet, _2) +12:15-12:22: @1[7]: _8 = &mut _2 +12:15-12:22: @1[8]: _7 = &mut (*_8) +12:15-12:22: @1.Call: _6 = <std::vec::Vec<T> as std::ops::DerefMut>::deref_mut(move _7) -> [return: bb2, unwind: bb5] +12:15-12:22: @2[0]: _5 = &mut (*_6) +12:5-12:26: @2.Call: _4 = permutate::<T>(move _5, const 0_usize) -> [return: bb3, unwind: bb5] +10:46-13:2: @3[4]: _0 = const () +13:2-13:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>fn permutations<T: Copy + Display>(xs: &[T]) {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="11:18-11:20: @0[2]: _3 = &(*_1) +11:18-11:31: @0.Call: _2 = <[T] as std::borrow::ToOwned>::to_owned(move _3) -> [return: bb1, unwind: bb6] +11:9-11:15: @1[1]: FakeRead(ForLet, _2) +12:15-12:22: @1[7]: _8 = &mut _2 +12:15-12:22: @1[8]: _7 = &mut (*_8) +12:15-12:22: @1.Call: _6 = <std::vec::Vec<T> as std::ops::DerefMut>::deref_mut(move _7) -> [return: bb2, unwind: bb5] +12:15-12:22: @2[0]: _5 = &mut (*_6) +12:5-12:26: @2.Call: _4 = permutate::<T>(move _5, const 0_usize) -> [return: bb3, unwind: bb5] +10:46-13:2: @3[4]: _0 = const () +13:2-13:2: @4.Return: return"> let mut ys = xs.to_owned();</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="11:18-11:20: @0[2]: _3 = &(*_1) +11:18-11:31: @0.Call: _2 = <[T] as std::borrow::ToOwned>::to_owned(move _3) -> [return: bb1, unwind: bb6] +11:9-11:15: @1[1]: FakeRead(ForLet, _2) +12:15-12:22: @1[7]: _8 = &mut _2 +12:15-12:22: @1[8]: _7 = &mut (*_8) +12:15-12:22: @1.Call: _6 = <std::vec::Vec<T> as std::ops::DerefMut>::deref_mut(move _7) -> [return: bb2, unwind: bb5] +12:15-12:22: @2[0]: _5 = &mut (*_6) +12:5-12:26: @2.Call: _4 = permutate::<T>(move _5, const 0_usize) -> [return: bb3, unwind: bb5] +10:46-13:2: @3[4]: _0 = const () +13:2-13:2: @4.Return: return"> permutate(&mut ys, 0);</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="11:18-11:20: @0[2]: _3 = &(*_1) +11:18-11:31: @0.Call: _2 = <[T] as std::borrow::ToOwned>::to_owned(move _3) -> [return: bb1, unwind: bb6] +11:9-11:15: @1[1]: FakeRead(ForLet, _2) +12:15-12:22: @1[7]: _8 = &mut _2 +12:15-12:22: @1[8]: _7 = &mut (*_8) +12:15-12:22: @1.Call: _6 = <std::vec::Vec<T> as std::ops::DerefMut>::deref_mut(move _7) -> [return: bb2, unwind: bb5] +12:15-12:22: @2[0]: _5 = &mut (*_6) +12:5-12:26: @2.Call: _4 = permutate::<T>(move _5, const 0_usize) -> [return: bb3, unwind: bb5] +10:46-13:2: @3[4]: _0 = const () +13:2-13:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.swap.-------.InstrumentCoverage.0.html b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.swap.-------.InstrumentCoverage.0.html new file mode 100644 index 00000000000..4c3f63093d3 --- /dev/null +++ b/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.swap.-------.InstrumentCoverage.0.html @@ -0,0 +1,173 @@ +<!DOCTYPE html> +<!-- + +Preview this file as rendered HTML from the github source at: +https://htmlpreview.github.io/?https://github.com/rust-lang/rust/blob/master/src/test/run-make-fulldeps/coverage-spanview/expected_mir_dump.inline/inline.swap.-------.InstrumentCoverage.0.html + +For revisions in Pull Requests (PR): + * Replace "rust-lang" with the github PR author + * Replace "master" with the PR branch name + +--> +<html> +<head> +<title>inline.swap - Coverage Spans</title> +<style> + .line { + counter-increment: line; + } + .line:before { + content: counter(line) ": "; + font-family: Menlo, Monaco, monospace; + font-style: italic; + width: 3.8em; + display: inline-block; + text-align: right; + filter: opacity(50%); + -webkit-user-select: none; + } + .code { + color: #dddddd; + background-color: #222222; + font-family: Menlo, Monaco, monospace; + line-height: 1.4em; + border-bottom: 2px solid #222222; + white-space: pre; + display: inline-block; + } + .odd { + background-color: #55bbff; + color: #223311; + } + .even { + background-color: #ee7756; + color: #551133; + } + .code { + --index: calc(var(--layer) - 1); + padding-top: calc(var(--index) * 0.15em); + filter: + hue-rotate(calc(var(--index) * 25deg)) + saturate(calc(100% - (var(--index) * 2%))) + brightness(calc(100% - (var(--index) * 1.5%))); + } + .annotation { + color: #4444ff; + font-family: monospace; + font-style: italic; + display: none; + -webkit-user-select: none; + } + body:active .annotation { + /* requires holding mouse down anywhere on the page */ + display: inline-block; + } + span:hover .annotation { + /* requires hover over a span ONLY on its first line */ + display: inline-block; + } +</style> +</head> +<body> +<div class="code" style="counter-reset: line 34"><span class="line"><span><span class="code even" style="--layer: 1" title="36:16-36:17: @0[2]: _5 = _2 +36:13-36:18: @0[3]: _6 = Len((*_1)) +36:13-36:18: @0[4]: _7 = Lt(_5, _6) +36:13-36:18: @1[0]: _4 = (*_1)[_5] +36:9-36:10: @1[1]: FakeRead(ForLet, _4) +37:16-37:17: @1[5]: _9 = _3 +37:13-37:18: @1[6]: _10 = Len((*_1)) +37:13-37:18: @1[7]: _11 = Lt(_9, _10) +37:13-37:18: @2[0]: _8 = (*_1)[_9] +37:8-37:9: @2[2]: _12 = _2 +37:5-37:10: @2[3]: _13 = Len((*_1)) +37:5-37:10: @2[4]: _14 = Lt(_12, _13) +37:5-37:18: @3[0]: (*_1)[_12] = move _8 +38:13-38:14: @3[5]: _15 = _4 +38:8-38:9: @3[7]: _16 = _3 +38:5-38:10: @3[8]: _17 = Len((*_1)) +38:5-38:10: @3[9]: _18 = Lt(_16, _17) +38:5-38:14: @4[0]: (*_1)[_16] = move _15 +35:52-39:2: @4[3]: _0 = const () +39:2-39:2: @4.Return: return"><span class="annotation">@0,1,2,3,4⦊</span>fn swap<T: Copy>(xs: &mut [T], i: usize, j: usize) {</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="36:16-36:17: @0[2]: _5 = _2 +36:13-36:18: @0[3]: _6 = Len((*_1)) +36:13-36:18: @0[4]: _7 = Lt(_5, _6) +36:13-36:18: @1[0]: _4 = (*_1)[_5] +36:9-36:10: @1[1]: FakeRead(ForLet, _4) +37:16-37:17: @1[5]: _9 = _3 +37:13-37:18: @1[6]: _10 = Len((*_1)) +37:13-37:18: @1[7]: _11 = Lt(_9, _10) +37:13-37:18: @2[0]: _8 = (*_1)[_9] +37:8-37:9: @2[2]: _12 = _2 +37:5-37:10: @2[3]: _13 = Len((*_1)) +37:5-37:10: @2[4]: _14 = Lt(_12, _13) +37:5-37:18: @3[0]: (*_1)[_12] = move _8 +38:13-38:14: @3[5]: _15 = _4 +38:8-38:9: @3[7]: _16 = _3 +38:5-38:10: @3[8]: _17 = Len((*_1)) +38:5-38:10: @3[9]: _18 = Lt(_16, _17) +38:5-38:14: @4[0]: (*_1)[_16] = move _15 +35:52-39:2: @4[3]: _0 = const () +39:2-39:2: @4.Return: return"> let t = xs[i];</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="36:16-36:17: @0[2]: _5 = _2 +36:13-36:18: @0[3]: _6 = Len((*_1)) +36:13-36:18: @0[4]: _7 = Lt(_5, _6) +36:13-36:18: @1[0]: _4 = (*_1)[_5] +36:9-36:10: @1[1]: FakeRead(ForLet, _4) +37:16-37:17: @1[5]: _9 = _3 +37:13-37:18: @1[6]: _10 = Len((*_1)) +37:13-37:18: @1[7]: _11 = Lt(_9, _10) +37:13-37:18: @2[0]: _8 = (*_1)[_9] +37:8-37:9: @2[2]: _12 = _2 +37:5-37:10: @2[3]: _13 = Len((*_1)) +37:5-37:10: @2[4]: _14 = Lt(_12, _13) +37:5-37:18: @3[0]: (*_1)[_12] = move _8 +38:13-38:14: @3[5]: _15 = _4 +38:8-38:9: @3[7]: _16 = _3 +38:5-38:10: @3[8]: _17 = Len((*_1)) +38:5-38:10: @3[9]: _18 = Lt(_16, _17) +38:5-38:14: @4[0]: (*_1)[_16] = move _15 +35:52-39:2: @4[3]: _0 = const () +39:2-39:2: @4.Return: return"> xs[i] = xs[j];</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="36:16-36:17: @0[2]: _5 = _2 +36:13-36:18: @0[3]: _6 = Len((*_1)) +36:13-36:18: @0[4]: _7 = Lt(_5, _6) +36:13-36:18: @1[0]: _4 = (*_1)[_5] +36:9-36:10: @1[1]: FakeRead(ForLet, _4) +37:16-37:17: @1[5]: _9 = _3 +37:13-37:18: @1[6]: _10 = Len((*_1)) +37:13-37:18: @1[7]: _11 = Lt(_9, _10) +37:13-37:18: @2[0]: _8 = (*_1)[_9] +37:8-37:9: @2[2]: _12 = _2 +37:5-37:10: @2[3]: _13 = Len((*_1)) +37:5-37:10: @2[4]: _14 = Lt(_12, _13) +37:5-37:18: @3[0]: (*_1)[_12] = move _8 +38:13-38:14: @3[5]: _15 = _4 +38:8-38:9: @3[7]: _16 = _3 +38:5-38:10: @3[8]: _17 = Len((*_1)) +38:5-38:10: @3[9]: _18 = Lt(_16, _17) +38:5-38:14: @4[0]: (*_1)[_16] = move _15 +35:52-39:2: @4[3]: _0 = const () +39:2-39:2: @4.Return: return"> xs[j] = t;</span></span> +<span class="line"><span class="code even" style="--layer: 1" title="36:16-36:17: @0[2]: _5 = _2 +36:13-36:18: @0[3]: _6 = Len((*_1)) +36:13-36:18: @0[4]: _7 = Lt(_5, _6) +36:13-36:18: @1[0]: _4 = (*_1)[_5] +36:9-36:10: @1[1]: FakeRead(ForLet, _4) +37:16-37:17: @1[5]: _9 = _3 +37:13-37:18: @1[6]: _10 = Len((*_1)) +37:13-37:18: @1[7]: _11 = Lt(_9, _10) +37:13-37:18: @2[0]: _8 = (*_1)[_9] +37:8-37:9: @2[2]: _12 = _2 +37:5-37:10: @2[3]: _13 = Len((*_1)) +37:5-37:10: @2[4]: _14 = Lt(_12, _13) +37:5-37:18: @3[0]: (*_1)[_12] = move _8 +38:13-38:14: @3[5]: _15 = _4 +38:8-38:9: @3[7]: _16 = _3 +38:5-38:10: @3[8]: _17 = Len((*_1)) +38:5-38:10: @3[9]: _18 = Lt(_16, _17) +38:5-38:14: @4[0]: (*_1)[_16] = move _15 +35:52-39:2: @4[3]: _0 = const () +39:2-39:2: @4.Return: return">}<span class="annotation">⦉@0,1,2,3,4</span></span></span></span></div> +</body> +</html> diff --git a/src/test/run-make-fulldeps/coverage/async.rs b/src/test/run-make-fulldeps/coverage/async.rs index 5553af92465..d5ec32deac1 100644 --- a/src/test/run-make-fulldeps/coverage/async.rs +++ b/src/test/run-make-fulldeps/coverage/async.rs @@ -1,6 +1,6 @@ #![allow(unused_assignments, dead_code)] -// require-rust-edition-2018 +// compile-flags: --edition=2018 async fn c(x: u8) -> u8 { if x == 8 { diff --git a/src/test/run-make-fulldeps/coverage/inline.rs b/src/test/run-make-fulldeps/coverage/inline.rs new file mode 100644 index 00000000000..9cfab9ddbad --- /dev/null +++ b/src/test/run-make-fulldeps/coverage/inline.rs @@ -0,0 +1,51 @@ +// compile-flags: -Zinline-mir + +use std::fmt::Display; + +fn main() { + permutations(&['a', 'b', 'c']); +} + +#[inline(always)] +fn permutations<T: Copy + Display>(xs: &[T]) { + let mut ys = xs.to_owned(); + permutate(&mut ys, 0); +} + +fn permutate<T: Copy + Display>(xs: &mut [T], k: usize) { + let n = length(xs); + if k == n { + display(xs); + } else if k < n { + for i in k..n { + swap(xs, i, k); + permutate(xs, k + 1); + swap(xs, i, k); + } + } else { + error(); + } +} + +fn length<T>(xs: &[T]) -> usize { + xs.len() +} + +#[inline] +fn swap<T: Copy>(xs: &mut [T], i: usize, j: usize) { + let t = xs[i]; + xs[i] = xs[j]; + xs[j] = t; +} + +fn display<T: Display>(xs: &[T]) { + for x in xs { + print!("{}", x); + } + println!(); +} + +#[inline(always)] +fn error() { + panic!("error"); +} diff --git a/src/test/ui/asm/inline-syntax.arm.stderr b/src/test/ui/asm/inline-syntax.arm.stderr new file mode 100644 index 00000000000..b1b61f0211a --- /dev/null +++ b/src/test/ui/asm/inline-syntax.arm.stderr @@ -0,0 +1,14 @@ +error: att syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:22:15 + | +LL | asm!(".att_syntax noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^ help: remove this assembler directive + +error: att syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:25:15 + | +LL | asm!(".att_syntax bbb noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this assembler directive + +error: aborting due to 2 previous errors + diff --git a/src/test/ui/asm/inline-syntax.rs b/src/test/ui/asm/inline-syntax.rs new file mode 100644 index 00000000000..9e9c7badfca --- /dev/null +++ b/src/test/ui/asm/inline-syntax.rs @@ -0,0 +1,38 @@ +// revisions: x86_64 arm +//[x86_64] compile-flags: --target x86_64-unknown-linux-gnu +//[arm] compile-flags: --target armv7-unknown-linux-gnueabihf + +#![feature(no_core, lang_items, rustc_attrs)] +#![no_core] + +#[rustc_builtin_macro] +macro_rules! asm { + () => {}; +} + +#[lang = "sized"] +trait Sized {} + +fn main() { + unsafe { + asm!(".intel_syntax noprefix", "nop"); + //[x86_64]~^ ERROR intel syntax is the default syntax on this target + asm!(".intel_syntax aaa noprefix", "nop"); + //[x86_64]~^ ERROR intel syntax is the default syntax on this target + asm!(".att_syntax noprefix", "nop"); + //[x86_64]~^ ERROR using the .att_syntax directive may cause issues + //[arm]~^^ att syntax is the default syntax on this target + asm!(".att_syntax bbb noprefix", "nop"); + //[x86_64]~^ ERROR using the .att_syntax directive may cause issues + //[arm]~^^ att syntax is the default syntax on this target + asm!(".intel_syntax noprefix; nop"); + //[x86_64]~^ ERROR intel syntax is the default syntax on this target + + asm!( + r" + .intel_syntax noprefix + nop" + ); + //[x86_64]~^^^ ERROR intel syntax is the default syntax on this target + } +} diff --git a/src/test/ui/asm/inline-syntax.x86_64.stderr b/src/test/ui/asm/inline-syntax.x86_64.stderr new file mode 100644 index 00000000000..c54c2742a57 --- /dev/null +++ b/src/test/ui/asm/inline-syntax.x86_64.stderr @@ -0,0 +1,50 @@ +error: intel syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:18:15 + | +LL | asm!(".intel_syntax noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^^^ help: remove this assembler directive + +error: intel syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:20:15 + | +LL | asm!(".intel_syntax aaa noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this assembler directive + +error: using the .att_syntax directive may cause issues, use the att_syntax option instead + --> $DIR/inline-syntax.rs:22:15 + | +LL | asm!(".att_syntax noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^ + | +help: remove the assembler directive and replace it with options(att_syntax) + | +LL | asm!("", "nop", options(att_syntax)); + | -- ^^^^^^^^^^^^^^^^^^^^^ + +error: using the .att_syntax directive may cause issues, use the att_syntax option instead + --> $DIR/inline-syntax.rs:25:15 + | +LL | asm!(".att_syntax bbb noprefix", "nop"); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | +help: remove the assembler directive and replace it with options(att_syntax) + | +LL | asm!("", "nop", options(att_syntax)); + | -- ^^^^^^^^^^^^^^^^^^^^^ + +error: intel syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:28:15 + | +LL | asm!(".intel_syntax noprefix; nop"); + | ^^^^^^^^^^^^^^^^^^^^^^ help: remove this assembler directive + +error: intel syntax is the default syntax on this target, and trying to use this directive may cause issues + --> $DIR/inline-syntax.rs:33:14 + | +LL | .intel_syntax noprefix + | ______________^ +LL | | nop" + | |_ help: remove this assembler directive + +error: aborting due to 6 previous errors + diff --git a/src/test/ui/lint/register-tool-lint.rs b/src/test/ui/lint/register-tool-lint.rs new file mode 100644 index 00000000000..0ba5a37b167 --- /dev/null +++ b/src/test/ui/lint/register-tool-lint.rs @@ -0,0 +1,11 @@ +#![crate_type = "lib"] +#![feature(register_tool)] +#![register_tool(xyz)] +#![warn(xyz::my_lint)] // this should not error +#![warn(abc::my_lint)] +//~^ ERROR unknown tool name `abc` found in scoped lint +//~| HELP add `#![register_tool(abc)]` +//~| ERROR unknown tool name `abc` +//~| HELP add `#![register_tool(abc)]` +//~| ERROR unknown tool name `abc` +//~| HELP add `#![register_tool(abc)]` diff --git a/src/test/ui/lint/register-tool-lint.stderr b/src/test/ui/lint/register-tool-lint.stderr new file mode 100644 index 00000000000..750c74cec1e --- /dev/null +++ b/src/test/ui/lint/register-tool-lint.stderr @@ -0,0 +1,27 @@ +error[E0710]: unknown tool name `abc` found in scoped lint: `abc::my_lint` + --> $DIR/register-tool-lint.rs:5:9 + | +LL | #![warn(abc::my_lint)] + | ^^^ + | + = help: add `#![register_tool(abc)]` to the crate root + +error[E0710]: unknown tool name `abc` found in scoped lint: `abc::my_lint` + --> $DIR/register-tool-lint.rs:5:9 + | +LL | #![warn(abc::my_lint)] + | ^^^ + | + = help: add `#![register_tool(abc)]` to the crate root + +error[E0710]: unknown tool name `abc` found in scoped lint: `abc::my_lint` + --> $DIR/register-tool-lint.rs:5:9 + | +LL | #![warn(abc::my_lint)] + | ^^^ + | + = help: add `#![register_tool(abc)]` to the crate root + +error: aborting due to 3 previous errors + +For more information about this error, try `rustc --explain E0710`. diff --git a/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.rs b/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.rs deleted file mode 100644 index 8ed7f25d2bb..00000000000 --- a/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Ensures -Zmir-opt-level=3 (specifically, inlining) is not allowed with -Zinstrument-coverage. -// Regression test for issue #80060. -// -// needs-profiler-support -// build-pass -// compile-flags: -Zmir-opt-level=3 -Zinstrument-coverage -#[inline(never)] -fn foo() {} - -pub fn baz() { - bar(); -} - -#[inline(always)] -fn bar() { - foo(); -} - -fn main() { - bar(); -} diff --git a/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.stderr b/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.stderr deleted file mode 100644 index d482afc395d..00000000000 --- a/src/test/ui/mir/mir-inlining/inline-instrument-coverage-fail.stderr +++ /dev/null @@ -1,2 +0,0 @@ -warning: `-Z mir-opt-level=3` (or any level > 1) enables function inlining, which is incompatible with `-Z instrument-coverage`. Inlining will be disabled. - diff --git a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs new file mode 100644 index 00000000000..abc3d2691a3 --- /dev/null +++ b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.rs @@ -0,0 +1,13 @@ +// check-pass +// aux-build:test-macros.rs + +#[macro_use] +extern crate test_macros; + +#[derive(Print)] +enum ProceduralMasqueradeDummyType { //~ WARN using +//~| WARN this was previously + Input +} + +fn main() {} diff --git a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stderr b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stderr new file mode 100644 index 00000000000..0b930705e35 --- /dev/null +++ b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stderr @@ -0,0 +1,25 @@ +warning: using `procedural-masquerade` crate + --> $DIR/issue-73933-procedural-masquerade.rs:8:6 + | +LL | enum ProceduralMasqueradeDummyType { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(proc_macro_back_compat)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125> + = note: The `procedural-masquerade` crate has been unnecessary since Rust 1.30.0. Versions of this crate below 0.1.7 will eventually stop compiling. + +warning: 1 warning emitted + +Future incompatibility report: Future breakage date: None, diagnostic: +warning: using `procedural-masquerade` crate + --> $DIR/issue-73933-procedural-masquerade.rs:8:6 + | +LL | enum ProceduralMasqueradeDummyType { + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = note: `#[warn(proc_macro_back_compat)]` on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #83125 <https://github.com/rust-lang/rust/issues/83125> + = note: The `procedural-masquerade` crate has been unnecessary since Rust 1.30.0. Versions of this crate below 0.1.7 will eventually stop compiling. + diff --git a/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout new file mode 100644 index 00000000000..8edd68f8a3b --- /dev/null +++ b/src/test/ui/proc-macro/issue-73933-procedural-masquerade.stdout @@ -0,0 +1,22 @@ +PRINT-DERIVE INPUT (DISPLAY): enum ProceduralMasqueradeDummyType { Input, } +PRINT-DERIVE RE-COLLECTED (DISPLAY): enum ProceduralMasqueradeDummyType { Input } +PRINT-DERIVE INPUT (DEBUG): TokenStream [ + Ident { + ident: "enum", + span: #0 bytes(100..104), + }, + Ident { + ident: "ProceduralMasqueradeDummyType", + span: #0 bytes(105..134), + }, + Group { + delimiter: Brace, + stream: TokenStream [ + Ident { + ident: "Input", + span: #0 bytes(186..191), + }, + ], + span: #0 bytes(135..193), + }, +] diff --git a/src/test/ui/tool_lints.rs b/src/test/ui/tool_lints.rs index 9c8540eede7..9e4aa7a939a 100644 --- a/src/test/ui/tool_lints.rs +++ b/src/test/ui/tool_lints.rs @@ -1,5 +1,5 @@ #[warn(foo::bar)] -//~^ ERROR an unknown tool name found in scoped lint: `foo::bar` -//~| ERROR an unknown tool name found in scoped lint: `foo::bar` -//~| ERROR an unknown tool name found in scoped lint: `foo::bar` +//~^ ERROR unknown tool name `foo` found in scoped lint: `foo::bar` +//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` +//~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` fn main() {} diff --git a/src/test/ui/tool_lints.stderr b/src/test/ui/tool_lints.stderr index 1bcd7fd735d..e06f6ddc1ca 100644 --- a/src/test/ui/tool_lints.stderr +++ b/src/test/ui/tool_lints.stderr @@ -1,20 +1,26 @@ -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/tool_lints.rs:1:8 | LL | #[warn(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/tool_lints.rs:1:8 | LL | #[warn(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/tool_lints.rs:1:8 | LL | #[warn(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root error: aborting due to 3 previous errors diff --git a/src/test/ui/unknown-lint-tool-name.rs b/src/test/ui/unknown-lint-tool-name.rs index 182aec34b47..84ab7c1944a 100644 --- a/src/test/ui/unknown-lint-tool-name.rs +++ b/src/test/ui/unknown-lint-tool-name.rs @@ -1,8 +1,8 @@ -#![deny(foo::bar)] //~ ERROR an unknown tool name found in scoped lint: `foo::bar` - //~| ERROR an unknown tool name found in scoped lint: `foo::bar` - //~| ERROR an unknown tool name found in scoped lint: `foo::bar` +#![deny(foo::bar)] //~ ERROR unknown tool name `foo` found in scoped lint: `foo::bar` + //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` + //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` -#[allow(foo::bar)] //~ ERROR an unknown tool name found in scoped lint: `foo::bar` - //~| ERROR an unknown tool name found in scoped lint: `foo::bar` - //~| ERROR an unknown tool name found in scoped lint: `foo::bar` +#[allow(foo::bar)] //~ ERROR unknown tool name `foo` found in scoped lint: `foo::bar` + //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` + //~| ERROR unknown tool name `foo` found in scoped lint: `foo::bar` fn main() {} diff --git a/src/test/ui/unknown-lint-tool-name.stderr b/src/test/ui/unknown-lint-tool-name.stderr index 414816d229c..1d145515abf 100644 --- a/src/test/ui/unknown-lint-tool-name.stderr +++ b/src/test/ui/unknown-lint-tool-name.stderr @@ -1,38 +1,50 @@ -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:1:9 | LL | #![deny(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:5:9 | LL | #[allow(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:1:9 | LL | #![deny(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:5:9 | LL | #[allow(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:1:9 | LL | #![deny(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root -error[E0710]: an unknown tool name found in scoped lint: `foo::bar` +error[E0710]: unknown tool name `foo` found in scoped lint: `foo::bar` --> $DIR/unknown-lint-tool-name.rs:5:9 | LL | #[allow(foo::bar)] | ^^^ + | + = help: add `#![register_tool(foo)]` to the crate root error: aborting due to 6 previous errors diff --git a/src/tools/compiletest/src/main.rs b/src/tools/compiletest/src/main.rs index b32a6f08638..1d4b5e1247d 100644 --- a/src/tools/compiletest/src/main.rs +++ b/src/tools/compiletest/src/main.rs @@ -44,7 +44,7 @@ fn main() { } if !config.has_tidy && config.mode == Mode::Rustdoc { - eprintln!("warning: `tidy` is not installed; generated diffs will be harder to read"); + eprintln!("warning: `tidy` is not installed; diffs will not be generated"); } log_config(&config); diff --git a/src/tools/compiletest/src/runtest.rs b/src/tools/compiletest/src/runtest.rs index f3286d88366..7aa3d4ab09e 100644 --- a/src/tools/compiletest/src/runtest.rs +++ b/src/tools/compiletest/src/runtest.rs @@ -2367,6 +2367,9 @@ impl<'test> TestCx<'test> { } fn compare_to_default_rustdoc(&mut self, out_dir: &Path) { + if !self.config.has_tidy { + return; + } println!("info: generating a diff against nightly rustdoc"); let suffix = @@ -2428,10 +2431,8 @@ impl<'test> TestCx<'test> { } } }; - if self.config.has_tidy { - tidy_dir(out_dir); - tidy_dir(&compare_dir); - } + tidy_dir(out_dir); + tidy_dir(&compare_dir); let pager = { let output = Command::new("git").args(&["config", "--get", "core.pager"]).output().ok(); |
