about summary refs log tree commit diff
path: root/library/std/src/io/cursor/tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'library/std/src/io/cursor/tests.rs')
-rw-r--r--library/std/src/io/cursor/tests.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/io/cursor/tests.rs b/library/std/src/io/cursor/tests.rs
index 80d88ca66f6..5da31ce0ba7 100644
--- a/library/std/src/io/cursor/tests.rs
+++ b/library/std/src/io/cursor/tests.rs
@@ -514,3 +514,10 @@ fn test_eq() {
 
     let _: AssertEq<Cursor<Vec<u8>>> = AssertEq(Cursor::new(Vec::new()));
 }
+
+#[allow(dead_code)]
+fn const_cursor() {
+    const CURSOR: Cursor<&[u8]> = Cursor::new(&[0]);
+    const _: &&[u8] = CURSOR.get_ref();
+    const _: u64 = CURSOR.position();
+}