]> git.lizzy.rs Git - rust.git/blob - src/test/ui/const-generics/issues/issue-90318.stderr
Rollup merge of #93613 - crlf0710:rename_to_async_iter, r=yaahc
[rust.git] / src / test / ui / const-generics / issues / issue-90318.stderr
1 error: overly complex generic constant
2   --> $DIR/issue-90318.rs:14:8
3    |
4 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
5    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
6    |          |
7    |          borrowing is not supported in generic constants
8    |
9    = help: consider moving this anonymous constant into a `const` function
10    = note: this operation may be supported in the future
11
12 error[E0015]: cannot call non-const operator in constants
13   --> $DIR/issue-90318.rs:14:10
14    |
15 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
16    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
17    |
18 note: impl defined here, but it is not `const`
19   --> $SRC_DIR/core/src/any.rs:LL:COL
20    |
21 LL | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
22    |                       ^^^^^^^^^
23    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
24    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
25
26 error: overly complex generic constant
27   --> $DIR/issue-90318.rs:22:8
28    |
29 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
30    |        ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
31    |          |
32    |          borrowing is not supported in generic constants
33    |
34    = help: consider moving this anonymous constant into a `const` function
35    = note: this operation may be supported in the future
36
37 error[E0015]: cannot call non-const operator in constants
38   --> $DIR/issue-90318.rs:22:10
39    |
40 LL |     If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
41    |          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
42    |
43 note: impl defined here, but it is not `const`
44   --> $SRC_DIR/core/src/any.rs:LL:COL
45    |
46 LL | #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Debug, Hash)]
47    |                       ^^^^^^^^^
48    = note: calls in constants are limited to constant functions, tuple structs and tuple variants
49    = note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
50
51 error: aborting due to 4 previous errors
52
53 For more information about this error, try `rustc --explain E0015`.