summaryrefslogtreecommitdiffstats
path: root/tests/run-coverage/inline.coverage
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-coverage/inline.coverage')
-rw-r--r--tests/run-coverage/inline.coverage102
1 files changed, 51 insertions, 51 deletions
diff --git a/tests/run-coverage/inline.coverage b/tests/run-coverage/inline.coverage
index 6f5d1544f..6efd9a083 100644
--- a/tests/run-coverage/inline.coverage
+++ b/tests/run-coverage/inline.coverage
@@ -1,54 +1,54 @@
- 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 {
+ LL| |// compile-flags: -Zinline-mir
+ LL| |
+ LL| |use std::fmt::Display;
+ LL| |
+ LL| 1|fn main() {
+ LL| 1| permutations(&['a', 'b', 'c']);
+ LL| 1|}
+ LL| |
+ LL| |#[inline(always)]
+ LL| 1|fn permutations<T: Copy + Display>(xs: &[T]) {
+ LL| 1| let mut ys = xs.to_owned();
+ LL| 1| permutate(&mut ys, 0);
+ LL| 1|}
+ LL| |
+ LL| 16|fn permutate<T: Copy + Display>(xs: &mut [T], k: usize) {
+ LL| 16| let n = length(xs);
+ LL| 16| if k == n {
+ LL| 6| display(xs);
+ LL| 10| } else if k < n {
+ LL| 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| 24| for x in xs {
+ LL| 15| swap(xs, i, k);
+ LL| 15| permutate(xs, k + 1);
+ LL| 15| swap(xs, i, k);
+ LL| 15| }
+ LL| 0| } else {
+ LL| 0| error();
+ LL| 0| }
+ LL| 16|}
+ LL| |
+ LL| 16|fn length<T>(xs: &[T]) -> usize {
+ LL| 16| xs.len()
+ LL| 16|}
+ LL| |
+ LL| |#[inline]
+ LL| 30|fn swap<T: Copy>(xs: &mut [T], i: usize, j: usize) {
+ LL| 30| let t = xs[i];
+ LL| 30| xs[i] = xs[j];
+ LL| 30| xs[j] = t;
+ LL| 30|}
+ LL| |
+ LL| 6|fn display<T: Display>(xs: &[T]) {
+ LL| 24| for x in xs {
^18
- 43| 18| print!("{}", x);
- 44| 18| }
- 45| 6| println!();
- 46| 6|}
- 47| |
- 48| |#[inline(always)]
- 49| 0|fn error() {
- 50| 0| panic!("error");
- 51| 0|}
+ LL| 18| print!("{}", x);
+ LL| 18| }
+ LL| 6| println!();
+ LL| 6|}
+ LL| |
+ LL| |#[inline(always)]
+ LL| 0|fn error() {
+ LL| 0| panic!("error");
+ LL| 0|}