about summary refs log tree commit diff
path: root/src/tools/rustfmt/tests
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-04 00:17:23 +0530
committerGitHub <noreply@github.com>2023-05-04 00:17:23 +0530
commit80df4ab403cbdaf0fc7a8301d8490ee60d7063bf (patch)
tree9c49bfac0499b037a7b2e35ea6c374962a1e2249 /src/tools/rustfmt/tests
parent32f3ddb902e03b7ac23de3e677ff27bc97eff0d6 (diff)
parent6fca051b76342f8c21ec85fb9a77103b7c05adb9 (diff)
downloadrust-80df4ab403cbdaf0fc7a8301d8490ee60d7063bf.tar.gz
rust-80df4ab403cbdaf0fc7a8301d8490ee60d7063bf.zip
Rollup merge of #110791 - compiler-errors:negative-bounds, r=oli-obk
Implement negative bounds for internal testing purposes

Implements partial support the `!` negative polarity on trait bounds. This is incomplete, but should allow us to at least be able to play with the feature.

Not even gonna consider them as a public-facing feature, but I'm implementing them because would've been nice to have in UI tests, for example in #110671.
Diffstat (limited to 'src/tools/rustfmt/tests')
-rw-r--r--src/tools/rustfmt/tests/target/negative-bounds.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/rustfmt/tests/target/negative-bounds.rs b/src/tools/rustfmt/tests/target/negative-bounds.rs
new file mode 100644
index 00000000000..4fb35cccf66
--- /dev/null
+++ b/src/tools/rustfmt/tests/target/negative-bounds.rs
@@ -0,0 +1,11 @@
+fn negative()
+where
+    i32: !Copy,
+{
+}
+
+fn maybe_const_negative()
+where
+    i32: ~const !Copy,
+{
+}