summaryrefslogtreecommitdiff
path: root/vendor/ref-cast/tests/ui/function-body.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/ref-cast/tests/ui/function-body.rs')
-rw-r--r--vendor/ref-cast/tests/ui/function-body.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/vendor/ref-cast/tests/ui/function-body.rs b/vendor/ref-cast/tests/ui/function-body.rs
new file mode 100644
index 00000000..915044a8
--- /dev/null
+++ b/vendor/ref-cast/tests/ui/function-body.rs
@@ -0,0 +1,12 @@
+use ref_cast::{ref_cast_custom, RefCastCustom};
+
+#[derive(RefCastCustom)]
+#[repr(transparent)]
+pub struct Thing(String);
+
+impl Thing {
+ #[ref_cast_custom]
+ pub fn ref_cast(s: &String) -> &Self {}
+}
+
+fn main() {}