1
Fork 0

coverage: Tweak individual tests to be unaffected by rustfmt

Some of these tests use non-standard formatting that we can simulate by
strategically adding `//` line comments.

One contains `where` clauses that would be split across multiple lines, which
we can keep on one line by moving the bounds to the generic type instead.
This commit is contained in:
Zalathar 2024-01-16 14:12:10 +11:00
parent f1494425bb
commit 1f9353ae2c
11 changed files with 57 additions and 45 deletions

View file

@ -1,11 +1,11 @@
LL| |#![allow(unused_assignments)]
LL| |// failure-status: 1
LL| |
LL| |struct Firework<T> where T: Copy + std::fmt::Display {
LL| |struct Firework<T: Copy + std::fmt::Display> {
LL| | strength: T,
LL| |}
LL| |
LL| |impl<T> Firework<T> where T: Copy + std::fmt::Display {
LL| |impl<T: Copy + std::fmt::Display> Firework<T> {
LL| | #[inline(always)]
LL| 3| fn set_strength(&mut self, new_strength: T) {
LL| 3| self.strength = new_strength;
@ -23,7 +23,7 @@
------------------
LL| |}
LL| |
LL| |impl<T> Drop for Firework<T> where T: Copy + std::fmt::Display {
LL| |impl<T: Copy + std::fmt::Display> Drop for Firework<T> {
LL| | #[inline(always)]
LL| 2| fn drop(&mut self) {
LL| 2| println!("BOOM times {}!!!", self.strength);