String literals whose line continuations were lost join their lines again

A run of spaces inside a string literal, where a line once ended in `\`, printed the next line's
indentation into the text. Swept every .rs file's string literals (non-raw) once for a run of
four or more spaces between two non-space characters, and for literals whose line ends without a
continuation; the latter were all intended multi-line text (LLVM IR, SQL, data tables, usage).

Restored (each run became ` \` and the next line's indentation, 28 runs):
- product messages: render_state.rs (SampleDepthClamp's text), degradation.rs
  (YCbCrFilterNotExact's text), two_planes.rs (a blit's why-not), device/create.rs (the dropped
  instance layers' line);
- tests and suites: render_sibling_work.rs, shadow_standing_device.rs, image_standing.rs (2),
  conformance texture_views.rs (2) and rate_map_sweeps.rs (3), validation plan_resources.rs and
  parallel_encodes.rs (2);
- conformance times.rs: a wrapped line after an explicit `\n`, its two-space indent kept;
- engine_refused_families.rs: one space in an LLVM IR line's `ptr addrspace(1)`.

The degradation texts change in whitespace alone; docs/API.md's catalogue names the kinds, not
these texts, and still matches. Left as written: aligned columns and indentation after `\n`
(kernel_textures.rs, renders.rs, argument_buffers.rs, degradation_catalogue.rs, the
conformance stability, verdict and cost reports, the tab table of dma_buf_leak_probe.rs, usage
texts). cargo fmt.
This commit is contained in:
Anees Iqbal committed 2026-11-12 23:16:47 -08:00
1 parent c1835b7e0b
commit 62dfb5cec3
13 files changed
+49 -19

No files matched your search

@@ -950,14 +950,16 @@ mod tests {
}
assert!(
unexplained.is_empty(),
"these points of the quality sweep derive one answer and no prediction of `rate_map_space` says why, so each is a site that compares nothing new: {}",
"these points of the quality sweep derive one answer and no prediction of \
`rate_map_space` says why, so each is a site that compares nothing new: {}",
unexplained.join("; ")
);
// And the sweep is not mostly collapse: most of its points read a bucket of their own.
let distinct = by_answer.len();
assert!(
distinct * 2 > answers.len(),
"the quality sweep derives {distinct} distinct answers over {} points, so over half of it is a second reading of a bucket already read",
"the quality sweep derives {distinct} distinct answers over {} points, so over half \
of it is a second reading of a bucket already read",
answers.len()
);
}
@@ -993,7 +995,8 @@ mod tests {
assert_eq!(
answers.len(),
1,
"the forms over {count} layer(s) compile {} different maps, so the walk is comparing shapes rather than construction paths",
"the forms over {count} layer(s) compile {} different maps, so the walk is \
comparing shapes rather than construction paths",
answers.len()
);
}
@@ -772,11 +772,13 @@ mod tests {
}
assert!(
missing.is_empty(),
"these `MTLTextureSwizzle` values are compared against Metal nowhere in the suite: {missing:?}"
"these `MTLTextureSwizzle` values are compared against Metal nowhere in the suite: \
{missing:?}"
);
assert!(
not_alone.is_empty(),
"these values appear only with all four channels the same, so a side that broadcast one channel over the other three would pass every row: {not_alone:?}"
"these values appear only with all four channels the same, so a side that broadcast \
one channel over the other three would pass every row: {not_alone:?}"
);
assert!(
parents().asks_inherited_swizzles,
+2 -1
View File
@@ -1165,7 +1165,8 @@ pub fn render(metal: Option<&Measurement>, ours: &Measurement, show: bool) -> St
" A RATIO FAR IN OUR FAVOUR IS A SETUP DIFFERENCE UNTIL SOMEBODY SHOWS OTHERWISE. The \
suite's recordings make 733\n shader references over 152 distinct (shader, entry) \
pairs, so 90% are to a shader another case already used,\n and our leg has a shader \
cache while Metal's newLibraryWithData recompiles every call. Our counters sum to 518\n shader modules and 1,040 pipelines for 122 ms of measured compile -- about 78 us each, \
cache while Metal's newLibraryWithData recompiles every call. Our counters sum to 518\n \
shader modules and 1,040 pipelines for 122 ms of measured compile -- about 78 us each, \
which is not a price at\n which any compile to machine code happens, so something below \
us is handing back work already done. Use\n --cold-shaders for the only setting under \
which the compile rows compare like with like.\n",
@@ -4430,7 +4430,10 @@ impl Device {
(
stage_object(stage.stage).to_owned(),
format!(
"a filtered sample of a texture its argument buffers name takes the device's filter, not Metal's exact filter of the format, and a texture the command makes resident or binds that they can name is two-plane YCbCr: {}",
"a filtered sample of a texture its argument buffers name takes the \
device's filter, not Metal's exact filter of the format, and a texture \
the command makes resident or binds that they can name is two-plane \
YCbCr: {}",
self.note_reason(note)
),
)
@@ -1047,8 +1047,14 @@ pub(crate) fn layers_dropped(dropped: &[CString], device: &str) -> Option<String
.map(|name| name.to_string_lossy().into_owned())
.collect();
Some(format!(
"metal2vulkan: the device on {device} was made without the instance layer(s) {}, which the loader answered VK_ERROR_LAYER_NOT_PRESENT for: a layer it does not list, or one it lists and cannot load (a layer manifest naming its library by a bare filename, which the loader looks for on the system library search path). The device is the same in every other way and its answers are Metal's; what those layers would have reported is missing [{LAYERS_DROPPED}]"
, names.join(", ")))
"metal2vulkan: the device on {device} was made without the instance layer(s) {}, which \
the loader answered VK_ERROR_LAYER_NOT_PRESENT for: a layer it does not list, or one it \
lists and cannot load (a layer manifest naming its library by a bare filename, which the \
loader looks for on the system library search path). The device is the same in every \
other way and its answers are Metal's; what those layers would have reported is missing \
[{LAYERS_DROPPED}]",
names.join(", ")
))
}
/// The id name of the informational message a device made without the layers its caller asked for
@@ -1436,7 +1436,9 @@ impl VertexClamp {
device.degrade(Degradation::SampleDepthClamp, || {
(
described(state, v),
"Metal adds the depth bias to each vertex's depth clamped to [0, 1], where the device adds it before its clamp of each sample, so a primitive past Metal's near or far plane stores otherwise"
"Metal adds the depth bias to each vertex's depth clamped to [0, 1], where \
the device adds it before its clamp of each sample, so a primitive past \
Metal's near or far plane stores otherwise"
.to_owned(),
)
});
@@ -347,7 +347,10 @@ fn a_copy_in_after_an_earlier_pass_of_its_command_buffer_wrote_the_texture_is_de
let skipped = delta(|c| c.shadow_texels_skipped_by_standing);
let command_buffer = delta(|c| c.shadow_texels_unskipped_command_buffer);
eprintln!(
"IMAGE-STANDING-EARLIER {} round {round}: {against} copies in against a standing, {texels} texels copied in, {skipped} skipped, {command_buffer} decided by the command buffer; VkCommandBuffers begun {}, batch work {}, continuations {}, submitted {}, submit infos {}",
"IMAGE-STANDING-EARLIER {} round {round}: {against} copies in against a standing, \
{texels} texels copied in, {skipped} skipped, {command_buffer} decided by the \
command buffer; VkCommandBuffers begun {}, batch work {}, continuations {}, \
submitted {}, submit infos {}",
device.name(),
delta(|c| c.command_buffers_begun),
delta(|c| c.command_buffers_begun_batch_work),
@@ -358,7 +361,8 @@ fn a_copy_in_after_an_earlier_pass_of_its_command_buffer_wrote_the_texture_is_de
assert_eq!(
(against, texels, skipped, command_buffer),
(0, SIDE * SIDE, 0, SIDE * SIDE),
"round {round}: the copies in against a standing, the texels copied in, those skipped, and those moved for the earlier pass's write"
"round {round}: the copies in against a standing, the texels copied in, those \
skipped, and those moved for the earlier pass's write"
);
let reds = tools.reds(&texture);
let wrong = (0..SIDE * SIDE).find_map(|at| {
@@ -84,7 +84,9 @@ fn a_run_of_render_creations_shares_every_piece_of_its_shaders() {
let before = device.work_counts();
assert!(
before.stage_entries_specialized > 0,
"the first creation must specialize its stages into the device's entries at all, not {} times: a creation that specializes nothing there, because it keeps entries of its own, makes the run's zero a vacuous zero",
"the first creation must specialize its stages into the device's entries at all, not {} \
times: a creation that specializes nothing there, because it keeps entries of its own, \
makes the run's zero a vacuous zero",
before.stage_entries_specialized
);
let mut kept = Vec::with_capacity(RUN as usize);
@@ -474,7 +474,8 @@ fn a_private_plane_copies_in_after_its_own_command_buffer_s_write_and_once_hande
assert_eq!(
(counts.at[COMMAND_BUFFER], written, counts.against),
(texels, texels, 0),
"decided by its own command buffer's write, as the reading encoder recorded it: no copy left to the submission"
"decided by its own command buffer's write, as the reading encoder recorded it: no copy \
left to the submission"
);
// SAFETY: the handle is only read; no work of the caller's uses it.
let _ = unsafe { plane.buffer.vk_buffer() };
@@ -613,7 +613,9 @@ impl BlitCommandEncoder {
Some("a copy within one texture")
} else if volume {
Some(
"a 3D texture, out of which Metal's blit reads the first texel at every texel and into which it wrote nothing at some widths, not modelled: the texels copy at the first depth slice",
"a 3D texture, out of which Metal's blit reads the first texel at every texel and \
into which it wrote nothing at some widths, not modelled: the texels copy at the \
first depth slice",
)
} else {
match (level(source)?, level(destination)?) {
@@ -388,7 +388,8 @@ impl<'a> PlanResources<'a> {
),
WriteSource::TileAttachment { color_index, .. } => {
return Err(format!(
"color attachment {color_index}'s sample planes, which the draw does not keep"
"color attachment {color_index}'s sample planes, which the draw does not \
keep"
)
.into())
}
@@ -185,7 +185,8 @@ fn a_fresh_texture_s_pattern_notice_follows_the_commit_order() {
*count = fresh_notices(&messages);
}
println!(
"PARALLEL-FRESH on {name}: {samples}x, {first:?} then {second:?}: {} notice(s) serially, {} with the later encoded first; Metal reads the pattern {metal:?} time(s)",
"PARALLEL-FRESH on {name}: {samples}x, {first:?} then {second:?}: {} notice(s) \
serially, {} with the later encoded first; Metal reads the pattern {metal:?} time(s)",
announced[0], announced[1]
);
// No pattern, so nothing to announce, on a device without Metal's compression.
@@ -199,7 +200,9 @@ fn a_fresh_texture_s_pattern_notice_follows_the_commit_order() {
}
assert!(
wrong.is_empty(),
"on {name}, notices of a new texture's pattern read that differ from the reads in commit order ((samples, loads, notices serially and with the later encoded first, the answer)): {wrong:?}"
"on {name}, notices of a new texture's pattern read that differ from the reads in commit \
order ((samples, loads, notices serially and with the later encoded first, the \
answer)): {wrong:?}"
);
drop(queue);
drop(device);
@@ -222,7 +222,7 @@ fn a_mistyped_call_to_a_defined_function_is_invalid_input() {
ret void
",
"define internal void @h(ptr addrspace(1) %p, i32 %v) {
store i32 %v, ptr addrspace(1) %p, align 4
store i32 %v, ptr addrspace(1) %p, align 4
ret void
}
",