Add ui test of checking mutable return from a shared reference argument
diff --git a/tests/ui/mut_return.rs b/tests/ui/mut_return.rs
new file mode 100644
index 0000000..74a5c69
--- /dev/null
+++ b/tests/ui/mut_return.rs
@@ -0,0 +1,11 @@
+#[cxx::bridge]
+mod ffi {
+ unsafe extern "C++" {
+ type Thing;
+
+ fn f(t: &Thing) -> Pin<&mut CxxString>;
+ unsafe fn g(t: &Thing) -> Pin<&mut CxxString>;
+ }
+}
+
+fn main() {}
diff --git a/tests/ui/mut_return.stderr b/tests/ui/mut_return.stderr
new file mode 100644
index 0000000..27043d7
--- /dev/null
+++ b/tests/ui/mut_return.stderr
@@ -0,0 +1,11 @@
+error: &mut return type is not allowed unless there is a &mut argument
+ --> $DIR/mut_return.rs:6:9
+ |
+6 | fn f(t: &Thing) -> Pin<&mut CxxString>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+error: &mut return type is not allowed unless there is a &mut argument
+ --> $DIR/mut_return.rs:7:16
+ |
+7 | unsafe fn g(t: &Thing) -> Pin<&mut CxxString>;
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^