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 3141262 commit cff6c0eCopy full SHA for cff6c0e
tests/ui/wf/wf-normalization-sized.rs
@@ -0,0 +1,19 @@
1
+// check-pass
2
+// known-bug: #100041
3
+
4
+// Should fail. Normalization can bypass well-formedness checking.
5
+// `[[[[[[u8]]]]]]` is not a well-formed type since size of type `[u8]` cannot
6
+// be known at compile time (since `Sized` is not implemented for `[u8]`).
7
8
+trait WellUnformed {
9
+ type RequestNormalize;
10
+}
11
12
+impl<T: ?Sized> WellUnformed for T {
13
+ type RequestNormalize = ();
14
15
16
+const _: <[[[[[[u8]]]]]] as WellUnformed>::RequestNormalize = ();
17
+const _: <Vec<str> as WellUnformed>::RequestNormalize = ();
18
19
+fn main() {}
0 commit comments