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

ices/88997.rs: fixed with errors #1003

Merged
merged 1 commit into from
Oct 31, 2021
Merged

ices/88997.rs: fixed with errors #1003

merged 1 commit into from
Oct 31, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#88997

#![allow(incomplete_features)]
#![feature(generic_const_exprs)]

struct ConstAssert<const COND: bool>;
trait True {}
impl True for ConstAssert<true> {}

struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
where
    ConstAssert<{ MIN <= MAX }>: True;
=== stdout ===
=== stderr ===
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/88997.rs:8:40
  |
8 | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
  |                                        ^ the type must not depend on the parameter `T`

error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/88997.rs:8:54
  |
8 | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
  |                                                      ^ the type must not depend on the parameter `T`

error[E0601]: `main` function not found in crate `88997`
  --> /home/runner/work/glacier/glacier/ices/88997.rs:1:1
   |
1  | / #![allow(incomplete_features)]
2  | | #![feature(generic_const_exprs)]
3  | |
4  | | struct ConstAssert<const COND: bool>;
...  |
9  | | where
10 | |     ConstAssert<{ MIN <= MAX }>: True;
   | |______________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/88997.rs`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0601, E0770.
For more information about an error, try `rustc --explain E0601`.
==============

=== stdout ===
=== stderr ===
error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/88997.rs:8:40
  |
8 | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
  |                                        ^ the type must not depend on the parameter `T`

error[E0770]: the type of const parameters must not depend on other generic parameters
 --> /home/runner/work/glacier/glacier/ices/88997.rs:8:54
  |
8 | struct Range<T: PartialOrd, const MIN: T, const MAX: T>(T)
  |                                                      ^ the type must not depend on the parameter `T`

error[E0601]: `main` function not found in crate `88997`
  --> /home/runner/work/glacier/glacier/ices/88997.rs:1:1
   |
1  | / #![allow(incomplete_features)]
2  | | #![feature(generic_const_exprs)]
3  | |
4  | | struct ConstAssert<const COND: bool>;
...  |
9  | | where
10 | |     ConstAssert<{ MIN <= MAX }>: True;
   | |______________________________________^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/88997.rs`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0601, E0770.
For more information about an error, try `rustc --explain E0601`.
==============
@Alexendoo Alexendoo merged commit 7249d80 into master Oct 31, 2021
@Alexendoo Alexendoo deleted the autofix/ices/88997.rs branch October 31, 2021 14:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants