Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Commit

Permalink
ices/113378.rs: fixed with errors
Browse files Browse the repository at this point in the history
=== stdout ===
=== stderr ===
error[E0379]: functions in trait impls cannot be declared const
 --> /home/runner/work/glacier/glacier/ices/113378.rs:7:5
  |
6 | impl<T> const Value for T {
  |         ----- this declares all associated functions implicitly const
7 |     const fn value() -> u32 {
  |     ^^^^^-
  |     |
  |     functions in trait impls cannot be const
  |     help: remove the `const`

error[E0407]: method `value` is not a member of trait `Value`
 --> /home/runner/work/glacier/glacier/ices/113378.rs:7:5
  |
7 | /     const fn value() -> u32 {
8 | |         0
9 | |     }
  | |_____^ not a member of trait `Value`

error: const `impl` for trait `Value` which is not marked with `#[const_trait]`
 --> /home/runner/work/glacier/glacier/ices/113378.rs:6:15
  |
4 | trait Value {}
  | - help: mark `Value` as const: `#[const_trait]`
5 |
6 | impl<T> const Value for T {
  |               ^^^^^
  |
  = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
  = note: adding a non-const method body in the future would be a breaking change

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0379, E0407.
For more information about an error, try `rustc --explain E0379`.
==============
  • Loading branch information
rustbot committed Jan 5, 2024
1 parent 39e92fe commit eb9b751
Showing 1 changed file with 0 additions and 0 deletions.
File renamed without changes.

0 comments on commit eb9b751

Please sign in to comment.