]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issue-67945-1.min.stderr
Auto merge of #79342 - CDirkx:ipaddr-const, r=oli-obk
[rust.git] / src / test / ui / const-generics / issue-67945-1.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/issue-67945-1.rs:14:16
3    |
4 LL |         let x: S = MaybeUninit::uninit();
5    |                ^ cannot perform const operation using `S`
6    |
7    = note: type parameters may not be used in const expressions
8    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
9
10 error: generic parameters may not be used in const operations
11   --> $DIR/issue-67945-1.rs:17:45
12    |
13 LL |         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
17    = help: use `#![feature(const_generics)]` and `#![feature(const_evaluatable_checked)]` to allow generic const expressions
18
19 error[E0392]: parameter `S` is never used
20   --> $DIR/issue-67945-1.rs:11:12
21    |
22 LL | 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`
26
27 error: aborting due to 3 previous errors
28
29 For more information about this error, try `rustc --explain E0392`.