]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/foreign-item-const-parameter.stderr
Rollup merge of #74333 - poliorcetics:std-alloc-unsafe-op-in-unsafe-fn, r=LukasKalbertodt
[rust.git] / src / test / ui / const-generics / foreign-item-const-parameter.stderr
1 warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
2   --> $DIR/foreign-item-const-parameter.rs:1:12
3    |
4 LL | #![feature(const_generics)]
5    |            ^^^^^^^^^^^^^^
6    |
7    = note: `#[warn(incomplete_features)]` on by default
8    = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
9
10 error[E0044]: foreign items may not have const parameters
11   --> $DIR/foreign-item-const-parameter.rs:5:5
12    |
13 LL |     fn foo<const X: usize>();
14    |     ^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters
15    |
16    = help: replace the const parameters with concrete consts
17
18 error[E0044]: foreign items may not have type or const parameters
19   --> $DIR/foreign-item-const-parameter.rs:7:5
20    |
21 LL |     fn bar<T, const X: usize>(_: T);
22    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have type or const parameters
23    |
24    = help: replace the type or const parameters with concrete types or consts
25
26 error: aborting due to 2 previous errors; 1 warning emitted
27
28 For more information about this error, try `rustc --explain E0044`.