diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 05:48:48 +0000 |
commit | ef24de24a82fe681581cc130f342363c47c0969a (patch) | |
tree | 0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/coverage/unused.coverage | |
parent | Releasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip |
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/coverage/unused.coverage')
-rw-r--r-- | tests/coverage/unused.coverage | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/tests/coverage/unused.coverage b/tests/coverage/unused.coverage new file mode 100644 index 000000000..056ffeb02 --- /dev/null +++ b/tests/coverage/unused.coverage @@ -0,0 +1,64 @@ + LL| |#![allow(dead_code, unused_assignments, unused_must_use, unused_variables)] + LL| | + LL| 2|fn foo<T>(x: T) { + LL| 2| let mut i = 0; + LL| 22| while i < 10 { + LL| 20| i != 0 || i != 0; + ^2 + LL| 20| i += 1; + LL| | } + LL| 2|} + ------------------ + | unused::foo::<f32>: + | LL| 1|fn foo<T>(x: T) { + | LL| 1| let mut i = 0; + | LL| 11| while i < 10 { + | LL| 10| i != 0 || i != 0; + | ^1 + | LL| 10| i += 1; + | LL| | } + | LL| 1|} + ------------------ + | unused::foo::<u32>: + | LL| 1|fn foo<T>(x: T) { + | LL| 1| let mut i = 0; + | LL| 11| while i < 10 { + | LL| 10| i != 0 || i != 0; + | ^1 + | LL| 10| i += 1; + | LL| | } + | LL| 1|} + ------------------ + LL| | + LL| 0|fn unused_template_func<T>(x: T) { + LL| 0| let mut i = 0; + LL| 0| while i < 10 { + LL| 0| i != 0 || i != 0; + LL| 0| i += 1; + LL| | } + LL| 0|} + LL| | + LL| 0|fn unused_func(mut a: u32) { + LL| 0| if a != 0 { + LL| 0| a += 1; + LL| 0| } + LL| 0|} + LL| | + LL| 0|fn unused_func2(mut a: u32) { + LL| 0| if a != 0 { + LL| 0| a += 1; + LL| 0| } + LL| 0|} + LL| | + LL| 0|fn unused_func3(mut a: u32) { + LL| 0| if a != 0 { + LL| 0| a += 1; + LL| 0| } + LL| 0|} + LL| | + LL| 1|fn main() -> Result<(), u8> { + LL| 1| foo::<u32>(0); + LL| 1| foo::<f32>(0.0); + LL| 1| Ok(()) + LL| 1|} + |