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

ices/77357.rs: fixed with errors #1230

Merged
merged 1 commit into from
May 1, 2022
Merged

ices/77357.rs: fixed with errors #1230

merged 1 commit into from
May 1, 2022

Conversation

github-actions[bot]
Copy link
Contributor

@github-actions github-actions bot commented May 1, 2022

Issue: rust-lang/rust#77357

#![feature(generic_const_exprs)]

trait MyTrait<T> {}

fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
    todo!()
}
=== stdout ===
=== stderr ===
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/77357.rs`

error: overly complex generic constant
 --> /home/runner/work/glacier/glacier/ices/77357.rs:5:46
  |
5 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constant
  |
  = help: consider moving this anonymous constant into a `const` function
  = note: this operation may be supported in the future

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0601`.
==============

=== stdout ===
=== stderr ===
warning: the feature `generic_const_exprs` is incomplete and may not be safe to use and/or cause compiler crashes
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:12
  |
1 | #![feature(generic_const_exprs)]
  |            ^^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #76560 <rust-lang/rust#76560> for more information

error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:7:2
  |
7 | }
  |  ^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/77357.rs`

error: overly complex generic constant
 --> /home/runner/work/glacier/glacier/ices/77357.rs:5:46
  |
5 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                              ^^^^^^^^^^^^^^^^^^^^^^^^^ blocks are not supported in generic constant
  |
  = help: consider moving this anonymous constant into a `const` function
  = note: this operation may be supported in the future

error: aborting due to 2 previous errors; 1 warning emitted

For more information about this error, try `rustc --explain E0601`.
==============
@Alexendoo Alexendoo merged commit e44597d into master May 1, 2022
@Alexendoo Alexendoo deleted the autofix/ices/77357.rs branch May 1, 2022 16:09
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