Add regression test for #106226

This commit is contained in:
Guillaume Gomez 2023-01-02 11:47:56 +01:00
parent 3919b71b48
commit e8853563df
2 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
// This is a regression test for <https://github.com/rust-lang/rust/issues/106226>.
type F = [_; ()];
//~^ ERROR

View File

@ -0,0 +1,9 @@
error[E0308]: mismatched types
--> $DIR/issue-106226.rs:2:14
|
LL | type F = [_; ()];
| ^^ expected `usize`, found `()`
error: aborting due to previous error
For more information about this error, try `rustc --explain E0308`.