Files
rust/tests/ui/sized/sized-reference-to-unsized.rs

12 lines
202 B
Rust
Raw Normal View History

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