]> git.proxmox.com Git - rustc.git/blame - src/test/ui/const-generics/issue-67945-1.min.stderr
New upstream version 1.54.0+dfsg1
[rustc.git] / src / test / ui / const-generics / issue-67945-1.min.stderr
CommitLineData
29967ef6 1error: generic parameters may not be used in const operations
5869c6ff 2 --> $DIR/issue-67945-1.rs:13:16
29967ef6
XL
3 |
4LL | let x: S = MaybeUninit::uninit();
5 | ^ cannot perform const operation using `S`
6 |
7 = note: type parameters may not be used in const expressions
fc512014 8 = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
29967ef6
XL
9
10error: generic parameters may not be used in const operations
5869c6ff 11 --> $DIR/issue-67945-1.rs:16:45
29967ef6
XL
12 |
13LL | let b = &*(&x as *const _ as *const S);
14 | ^ cannot perform const operation using `S`
15 |
16 = note: type parameters may not be used in const expressions
fc512014 17 = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
29967ef6
XL
18
19error[E0392]: parameter `S` is never used
5869c6ff 20 --> $DIR/issue-67945-1.rs:10:12
29967ef6
XL
21 |
22LL | struct Bug<S> {
23 | ^ unused parameter
24 |
25 = help: consider removing `S`, referring to it in a field, or using a marker such as `PhantomData`
17df50a5 26 = help: if you intended `S` to be a const parameter, use `const S: usize` instead
29967ef6
XL
27
28error: aborting due to 3 previous errors
29
30For more information about this error, try `rustc --explain E0392`.