summaryrefslogtreecommitdiffstats
path: root/tests/pretty/trait-safety.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/pretty/trait-safety.rs')
-rw-r--r--tests/pretty/trait-safety.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/pretty/trait-safety.rs b/tests/pretty/trait-safety.rs
new file mode 100644
index 000000000..c4ae76069
--- /dev/null
+++ b/tests/pretty/trait-safety.rs
@@ -0,0 +1,15 @@
+// pp-exact
+
+unsafe trait UnsafeTrait {
+ fn foo(&self);
+}
+
+unsafe impl UnsafeTrait for isize {
+ fn foo(&self) {}
+}
+
+pub unsafe trait PubUnsafeTrait {
+ fn foo(&self);
+}
+
+fn main() {}