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

ices/84659.rs: fixed with errors #955

Merged
merged 1 commit into from
Sep 1, 2021
Merged

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented Sep 1, 2021

Issue: rust-lang/rust#84659

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

trait Bar<const N: usize> {}

trait Foo<'a> {
    const N: usize;
    type Baz: Bar<{ Self::N }>;
}
=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/84659.rs:2:12
  |
2 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of `#![feature(adt_const_params]` and `#![feature(generic_const_exprs)]`

error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/84659.rs:8:21
  |
8 |     type Baz: Bar<{ Self::N }>;
  |                     ^^^^^^^ cannot perform const operation using `Self`
  |
  = note: type parameters may not be used in const expressions
  = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions

error[E0601]: `main` function not found in crate `84659`
 --> /home/runner/work/glacier/glacier/ices/84659.rs:1:1
  |
1 | / #![allow(incomplete_features)]
2 | | #![feature(const_generics)]
3 | |
4 | | trait Bar<const N: usize> {}
... |
8 | |     type Baz: Bar<{ Self::N }>;
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84659.rs`

error: aborting due to 3 previous errors

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

=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/84659.rs:2:12
  |
2 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of `#![feature(adt_const_params]` and `#![feature(generic_const_exprs)]`

error: generic parameters may not be used in const operations
 --> /home/runner/work/glacier/glacier/ices/84659.rs:8:21
  |
8 |     type Baz: Bar<{ Self::N }>;
  |                     ^^^^^^^ cannot perform const operation using `Self`
  |
  = note: type parameters may not be used in const expressions
  = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions

error[E0601]: `main` function not found in crate `84659`
 --> /home/runner/work/glacier/glacier/ices/84659.rs:1:1
  |
1 | / #![allow(incomplete_features)]
2 | | #![feature(const_generics)]
3 | |
4 | | trait Bar<const N: usize> {}
... |
8 | |     type Baz: Bar<{ Self::N }>;
9 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/84659.rs`

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0601.
For more information about an error, try `rustc --explain E0557`.
==============
@Alexendoo Alexendoo merged commit 8ec1812 into master Sep 1, 2021
@Alexendoo Alexendoo deleted the autofix/ices/84659.rs branch September 1, 2021 16:19
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