2023-07-03 17:42:48 +00:00
|
|
|
use std::borrow::Cow;
|
|
|
|
use std::collections::BTreeMap;
|
|
|
|
use std::marker::PhantomData;
|
|
|
|
use std::sync::Arc;
|
2021-07-15 22:35:43 +00:00
|
|
|
|
|
|
|
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!());
|
2023-07-28 19:35:48 +00:00
|
|
|
//~^ ERROR: sub-expression diverges
|
|
|
|
//~| NOTE: `-D clippy::diverging-sub-expression` implied by `-D warnings`
|
2021-07-15 22:35:43 +00:00
|
|
|
group_entries(panic!());
|
2023-07-28 19:35:48 +00:00
|
|
|
//~^ ERROR: sub-expression diverges
|
2021-07-15 22:35:43 +00:00
|
|
|
}
|