rust/tests/ui/consts/fn_trait_refs.stderr

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

219 lines
6.8 KiB
Plaintext
Raw Normal View History

2023-04-16 11:12:37 +00:00
error[E0635]: unknown feature `const_fn_trait_ref_impls`
--> $DIR/fn_trait_refs.rs:3:12
|
LL | #![feature(const_fn_trait_ref_impls)]
| ^^^^^^^^^^^^^^^^^^^^^^^^
2024-06-21 11:57:24 +00:00
error[E0635]: unknown feature `const_cmp`
2024-08-17 12:19:34 +00:00
--> $DIR/fn_trait_refs.rs:7:12
2024-06-21 11:57:24 +00:00
|
LL | #![feature(const_cmp)]
| ^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:13:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^
2024-06-21 11:57:24 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:13:31
2024-06-21 11:57:24 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:13:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^
2023-10-04 18:34:50 +00:00
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-08-13 09:02:31 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:20:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^^
2024-06-21 11:57:24 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:20:34
2024-06-21 11:57:24 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:20:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^^
2023-10-04 18:34:50 +00:00
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-08-13 09:02:31 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:27:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnOnce<()>,
| ^^^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:27:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnOnce<()>,
| ^^^^^^^^^^
2023-10-04 18:34:50 +00:00
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-08-13 09:02:31 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:34:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^
2024-06-21 11:57:24 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:34:31
2024-06-21 11:57:24 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:34:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const Fn<()> + ~const Destruct,
| ^^^^^^
2023-10-04 18:34:50 +00:00
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-08-13 09:02:31 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:48:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^^
2024-06-21 11:57:24 +00:00
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:48:34
2024-06-21 11:57:24 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^
error: `~const` can only be applied to `#[const_trait]` traits
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:48:15
2023-08-13 09:02:31 +00:00
|
LL | T: ~const FnMut<()> + ~const Destruct,
| ^^^^^^^^^
2023-10-04 18:34:50 +00:00
|
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
2023-08-13 09:02:31 +00:00
error[E0015]: cannot call non-const operator in constants
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:70:17
|
LL | assert!(test_one == (1, 1, 1));
| ^^^^^^^^^^^^^^^^^^^^^
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error[E0015]: cannot call non-const operator in constants
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:73:17
|
LL | assert!(test_two == (2, 2));
| ^^^^^^^^^^^^^^^^^^
|
= note: calls in constants are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error[E0015]: cannot call non-const closure in constant functions
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:15:5
|
LL | f()
| ^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: consider further restricting this bound
|
LL | T: ~const Fn<()> + ~const Destruct + ~const Fn(),
| +++++++++++++
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:11:23
|
LL | const fn tester_fn<T>(f: T) -> T::Output
| ^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
| - value is dropped here
error[E0015]: cannot call non-const closure in constant functions
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:22:5
|
LL | f()
| ^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: consider further restricting this bound
|
LL | T: ~const FnMut<()> + ~const Destruct + ~const FnMut(),
| ++++++++++++++++
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:18:27
|
LL | const fn tester_fn_mut<T>(mut f: T) -> T::Output
| ^^^^^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
| - value is dropped here
error[E0015]: cannot call non-const closure in constant functions
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:29:5
|
LL | f()
| ^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: consider further restricting this bound
|
LL | T: ~const FnOnce<()> + ~const FnOnce(),
| +++++++++++++++++
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:32:21
|
LL | const fn test_fn<T>(mut f: T) -> (T::Output, T::Output, T::Output)
| ^^^^^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
| - value is dropped here
error[E0493]: destructor of `T` cannot be evaluated at compile-time
2024-08-26 12:51:16 +00:00
--> $DIR/fn_trait_refs.rs:46:25
|
LL | const fn test_fn_mut<T>(mut f: T) -> (T::Output, T::Output)
| ^^^^^ the destructor for this type cannot be evaluated in constant functions
...
LL | }
| - value is dropped here
2024-06-21 11:57:24 +00:00
error: aborting due to 25 previous errors
2023-04-16 11:12:37 +00:00
Some errors have detailed explanations: E0015, E0493, E0635.
For more information about an error, try `rustc --explain E0015`.