rust/tests/ui/const-generics/issues/issue-90318.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.9 KiB
Plaintext
Raw Normal View History

2023-01-16 14:26:03 -06:00
error: overly complex generic constant
--> $DIR/issue-90318.rs:14:8
2021-12-08 16:25:52 -06:00
|
LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
2023-01-16 14:26:03 -06:00
| ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
| |
| borrowing is not supported in generic constants
2021-12-08 16:25:52 -06:00
|
2023-01-16 14:26:03 -06:00
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
2021-12-08 16:25:52 -06:00
2023-01-16 14:26:03 -06:00
error: overly complex generic constant
--> $DIR/issue-90318.rs:22:8
2021-12-08 16:25:52 -06:00
|
LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
2023-01-16 14:26:03 -06:00
| ^^-----------------^^^^^^^^^^^^^^^^^^^^^^^^
| |
| borrowing is not supported in generic constants
2021-12-08 16:25:52 -06:00
|
2023-01-16 14:26:03 -06:00
= help: consider moving this anonymous constant into a `const` function
= note: this operation may be supported in the future
2021-12-08 16:25:52 -06:00
error[E0015]: cannot call non-const operator in constants
--> $DIR/issue-90318.rs:14:10
|
LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/any.rs:LL:COL
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
error[E0015]: cannot call non-const operator in constants
--> $DIR/issue-90318.rs:22:10
|
LL | If<{ TypeId::of::<T>() != TypeId::of::<()>() }>: True,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
note: impl defined here, but it is not `const`
--> $SRC_DIR/core/src/any.rs:LL:COL
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
= help: add `#![feature(const_trait_impl)]` to the crate attributes to enable
error: aborting due to 4 previous errors
2021-12-08 16:25:52 -06:00
For more information about this error, try `rustc --explain E0015`.