about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorDevin Ragotzy <devin.ragotzy@gmail.com>2021-07-15 18:35:43 -0400
committerDevin Ragotzy <devin.ragotzy@gmail.com>2021-07-15 18:37:02 -0400
commit7312611207b8f917f1ea9ed759c684d5ca817bfe (patch)
tree8116609e20c0ff6544c22f94f858cbc670d2fd32 /tests
parent78ffcd9959cc81d1328fcafb996dcc7cd9b5f1ac (diff)
downloadrust-7312611207b8f917f1ea9ed759c684d5ca817bfe.tar.gz
rust-7312611207b8f917f1ea9ed759c684d5ca817bfe.zip
Add check if ty has_escaping_bound_vars in zero_sized_map_values lint
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/issue-7447.rs25
1 files changed, 25 insertions, 0 deletions
diff --git a/tests/ui/issue-7447.rs b/tests/ui/issue-7447.rs
new file mode 100644
index 00000000000..fdb77f32257
--- /dev/null
+++ b/tests/ui/issue-7447.rs
@@ -0,0 +1,25 @@
+use std::{borrow::Cow, collections::BTreeMap, marker::PhantomData, sync::Arc};
+
+fn byte_view<'a>(s: &'a ByteView<'_>) -> BTreeMap<&'a str, ByteView<'a>> {
+    panic!()
+}
+
+fn group_entries(s: &()) -> BTreeMap<Cow<'_, str>, Vec<Cow<'_, str>>> {
+    todo!()
+}
+
+struct Mmap;
+
+enum ByteViewBacking<'a> {
+    Buf(Cow<'a, [u8]>),
+    Mmap(Mmap),
+}
+
+pub struct ByteView<'a> {
+    backing: Arc<ByteViewBacking<'a>>,
+}
+
+fn main() {
+    byte_view(panic!());
+    group_entries(panic!());
+}