rust/tests/ui/sized/sized-reference-to-unsized.rs
2025-07-05 01:54:04 +05:00

12 lines
202 B
Rust

//! Check that a reference to a potentially unsized type (`&T`) is itself considered `Sized`.
//@ run-pass
#![allow(dead_code)]
fn bar<T: Sized>() {}
fn foo<T>() {
bar::<&T>()
}
pub fn main() {}