about summary refs log tree commit diff
path: root/tests/ui/sized/sized-reference-to-unsized.rs
blob: ac2934d8fe64655fc533a34250eca01dca220d80 (plain)
1
2
3
4
5
6
7
8
9
10
11
//! 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() {}