Files
Notes/notes-service/vendor/ref-cast/tests/ui/impl-trait.rs
T
2026-08-01 16:11:49 +03:00

16 lines
297 B
Rust

use ref_cast::{ref_cast_custom, RefCastCustom};
#[derive(RefCastCustom)]
#[repr(transparent)]
pub struct Thing(str);
impl Thing {
#[ref_cast_custom]
pub fn ref_cast(s: impl AsRef<str>) -> &Self;
#[ref_cast_custom]
pub fn ref_cast2(s: &impl AsRef<str>) -> &Self;
}
fn main() {}