about summary refs log tree commit diff
path: root/src/tools/compiletest
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2024-12-02 23:08:57 +0100
committerGitHub <noreply@github.com>2024-12-02 23:08:57 +0100
commit8a26a8bf48ba8b4b3e2328fced3cf3804d4fd80c (patch)
treed8cce8cae406a14331aeb29e77085c3afeae63e1 /src/tools/compiletest
parent7d67af98b5abe95510c161d3c5257f06c0d475f2 (diff)
parent43bed16b8bc4f410934d6cf983a8f3c84d66ac91 (diff)
downloadrust-8a26a8bf48ba8b4b3e2328fced3cf3804d4fd80c.tar.gz
rust-8a26a8bf48ba8b4b3e2328fced3cf3804d4fd80c.zip
Rollup merge of #133710 - Urgau:target_feature-merge-conflitcs, r=jieyouxu
Reducing `target_feature` check-cfg merge conflicts

It was rightfully pointed in https://github.com/rust-lang/rust/pull/133099#discussion_r1862490542 that the expected values for the `target_feature` cfg are regularly updated and unfortunately the check-cfg tests for it are very merge-conflict prone.

This PR aims at drastically reducing the likely-hood of those, by normalizing the "and X more" diagnostic, as well as making the full expected list multi-line instead of being on a single one.

cc `@RalfJung`
r? `@jieyouxu`
Diffstat (limited to 'src/tools/compiletest')
-rw-r--r--src/tools/compiletest/src/header.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tools/compiletest/src/header.rs b/src/tools/compiletest/src/header.rs
index 73e56cfac8f..91558d0c898 100644
--- a/src/tools/compiletest/src/header.rs
+++ b/src/tools/compiletest/src/header.rs
@@ -1125,6 +1125,8 @@ fn parse_normalize_rule(header: &str) -> Option<(String, String)> {
     .captures(header)?;
     let regex = captures["regex"].to_owned();
     let replacement = captures["replacement"].to_owned();
+    // FIXME: Support escaped new-line in strings.
+    let replacement = replacement.replace("\\n", "\n");
     Some((regex, replacement))
 }