diff options
Diffstat (limited to 'src/test/ui/const-generics/foreign-item-const-parameter.stderr')
-rw-r--r-- | src/test/ui/const-generics/foreign-item-const-parameter.stderr | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/test/ui/const-generics/foreign-item-const-parameter.stderr b/src/test/ui/const-generics/foreign-item-const-parameter.stderr new file mode 100644 index 000000000..b02db8700 --- /dev/null +++ b/src/test/ui/const-generics/foreign-item-const-parameter.stderr @@ -0,0 +1,19 @@ +error[E0044]: foreign items may not have const parameters + --> $DIR/foreign-item-const-parameter.rs:2:5 + | +LL | fn foo<const X: usize>(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters + | + = help: replace the const parameters with concrete consts + +error[E0044]: foreign items may not have type or const parameters + --> $DIR/foreign-item-const-parameter.rs:4:5 + | +LL | fn bar<T, const X: usize>(_: T); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have type or const parameters + | + = help: replace the type or const parameters with concrete types or consts + +error: aborting due to 2 previous errors + +For more information about this error, try `rustc --explain E0044`. |