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 0fbfc3e commit 5d7234aCopy full SHA for 5d7234a
tests/ui/mir/unsize-trait.rs
@@ -0,0 +1,15 @@
1
+// Check that the interpreter does not ICE when trying to unsize `B` to `[u8]`.
2
+// This is a `build` test to ensure that const-prop-lint runs.
3
+// build-pass
4
+
5
+#![feature(unsize)]
6
7
+fn foo<B>(buffer: &mut [B; 2])
8
+ where B: std::marker::Unsize<[u8]>,
9
+{
10
+ let buffer: &[u8] = &buffer[0];
11
+}
12
13
+fn main() {
14
+ foo(&mut [[0], [5]]);
15
0 commit comments