about summary refs log tree commit diff
diff options
context:
space:
mode:
authormejrs <59372212+mejrs@users.noreply.github.com>2023-02-23 01:01:50 +0100
committermejrs <59372212+mejrs@users.noreply.github.com>2023-02-23 01:14:10 +0100
commit634d8cb757adbdec0d53dd6660e504eb0b30e4e1 (patch)
treeac67f90ac549a08b4edce0833dd982ffa8623385
parent242daf86d9bbc062e0c32357453da26ddf955e13 (diff)
downloadrust-634d8cb757adbdec0d53dd6660e504eb0b30e4e1.tar.gz
rust-634d8cb757adbdec0d53dd6660e504eb0b30e4e1.zip
Test that choosing the default bundle does not ice
-rw-r--r--tests/ui/issues/issue-106755.rs19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ui/issues/issue-106755.rs b/tests/ui/issues/issue-106755.rs
new file mode 100644
index 00000000000..46ece725fb7
--- /dev/null
+++ b/tests/ui/issues/issue-106755.rs
@@ -0,0 +1,19 @@
+// compile-flags:-Ztranslate-lang=en_US
+
+#![feature(negative_impls)]
+#![feature(marker_trait_attr)]
+
+#[marker]
+trait MyTrait {}
+
+struct TestType<T>(::std::marker::PhantomData<T>);
+
+unsafe impl<T: MyTrait + 'static> Send for TestType<T> {}
+
+impl<T: MyTrait> !Send for TestType<T> {} //~ ERROR found both positive and negative implementation
+
+unsafe impl<T: 'static> Send for TestType<T> {} //~ ERROR conflicting implementations
+
+impl !Send for TestType<i32> {}
+
+fn main() {}