We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 579b5f1 commit abf037aCopy full SHA for abf037a
tests/ui/sized/sized-reference-to-unsized.rs
@@ -1,9 +1,12 @@
1
+//! Check that a reference to a potentially unsized type (`&T`) is itself considered `Sized`.
2
+//! This allows functions requiring `Sized` types to accept references to dynamically sized types.
3
+
4
//@ run-pass
5
6
#![allow(dead_code)]
-// Possibly-dynamic size of typaram should be cleared at pointer boundary.
-
7
-fn bar<T: Sized>() { }
8
-fn foo<T>() { bar::<&T>() }
9
-pub fn main() { }
+fn bar<T: Sized>() {}
+fn foo<T>() {
10
+ bar::<&T>()
11
+}
12
+pub fn main() {}
0 commit comments