Skip to content

Commit effa5f0

Browse files
committed
sized-owned-pointer
1 parent d5215f5 commit effa5f0

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed
Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
//! Check that `Box<T>` is `Sized`, even when `T` is a dynamically sized type.
2+
//! This allows `Box<T>` to be used in contexts requiring `Sized` types.
3+
14
//@ run-pass
25

36
#![allow(dead_code)]
4-
// Possibly-dynamic size of typaram should be cleared at pointer boundary.
5-
6-
77

8-
fn bar<T: Sized>() { }
9-
fn foo<T>() { bar::<Box<T>>() }
10-
pub fn main() { }
8+
fn bar<T: Sized>() {}
9+
fn foo<T>() {
10+
bar::<Box<T>>()
11+
}
12+
pub fn main() {}

0 commit comments

Comments
 (0)