diff options
Diffstat (limited to 'tests/ui/associated-item/issue-48027.rs')
-rw-r--r-- | tests/ui/associated-item/issue-48027.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/ui/associated-item/issue-48027.rs b/tests/ui/associated-item/issue-48027.rs new file mode 100644 index 000000000..d2b51184c --- /dev/null +++ b/tests/ui/associated-item/issue-48027.rs @@ -0,0 +1,8 @@ +trait Bar { + const X: usize; + fn return_n(&self) -> [u8; Bar::X]; //~ ERROR: E0790 +} + +impl dyn Bar {} //~ ERROR: the trait `Bar` cannot be made into an object + +fn main() {} |