diff options
| author | Michael Goulet <michael@errs.io> | 2023-06-24 18:03:20 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-06-24 18:04:14 +0000 |
| commit | 28f39862a8a673d5d162121b8c432a5b82883d3d (patch) | |
| tree | 40475ed32bf819f9666ea9b8c30c9c996ee8d7cb /tests/ui/consts/missing-larger-array-impl.rs | |
| parent | 1d67eba6873b1d551a259a0bbc1e2651b4443e12 (diff) | |
| download | rust-28f39862a8a673d5d162121b8c432a5b82883d3d.tar.gz rust-28f39862a8a673d5d162121b8c432a5b82883d3d.zip | |
use Const::eval instead of QueryNormalize in error reporting
Diffstat (limited to 'tests/ui/consts/missing-larger-array-impl.rs')
| -rw-r--r-- | tests/ui/consts/missing-larger-array-impl.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/consts/missing-larger-array-impl.rs b/tests/ui/consts/missing-larger-array-impl.rs new file mode 100644 index 00000000000..e6c879c8ebd --- /dev/null +++ b/tests/ui/consts/missing-larger-array-impl.rs @@ -0,0 +1,9 @@ +struct X; + +// Make sure that we show the impl trait refs in the help message with +// their evaluated constants, rather than `core::::array::{impl#30}::{constant#0}` + +fn main() { + <[X; 35] as Default>::default(); + //~^ ERROR the trait bound `[X; 35]: Default` is not satisfied +} |
