about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkadmin <julianknodt@gmail.com>2020-08-26 00:30:02 +0000
committerkadmin <julianknodt@gmail.com>2020-08-30 19:39:51 +0000
commit8894b366fdb976a703fe76010f6e56c591cada1f (patch)
tree3a4df5c9914a364aa388b9f4ccf16e65726acf4b /src
parent85fbf49ce0e2274d0acf798f6e703747674feec3 (diff)
downloadrust-8894b366fdb976a703fe76010f6e56c591cada1f.tar.gz
rust-8894b366fdb976a703fe76010f6e56c591cada1f.zip
Remove error message in specific case
In the case that a trait is not implemented for an ADT with type errors, cancel the error.
Diffstat (limited to 'src')
-rw-r--r--src/test/ui/traits/issue-75627.rs6
-rw-r--r--src/test/ui/traits/issue-75627.stderr9
2 files changed, 15 insertions, 0 deletions
diff --git a/src/test/ui/traits/issue-75627.rs b/src/test/ui/traits/issue-75627.rs
new file mode 100644
index 00000000000..93a2ec1cc50
--- /dev/null
+++ b/src/test/ui/traits/issue-75627.rs
@@ -0,0 +1,6 @@
+struct Foo<T>(T, *const ());
+
+unsafe impl Send for Foo<T> {}
+//~^ ERROR cannot find type
+
+fn main() {}
diff --git a/src/test/ui/traits/issue-75627.stderr b/src/test/ui/traits/issue-75627.stderr
new file mode 100644
index 00000000000..92d9ac0f84c
--- /dev/null
+++ b/src/test/ui/traits/issue-75627.stderr
@@ -0,0 +1,9 @@
+error[E0412]: cannot find type `T` in this scope
+  --> $DIR/issue-75627.rs:3:26
+   |
+LL | unsafe impl Send for Foo<T> {}
+   |                          ^ not found in this scope
+
+error: aborting due to previous error
+
+For more information about this error, try `rustc --explain E0412`.