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 #947

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

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

Issue: rust-lang/rust#77357

#![feature(const_generics)]

trait MyTrait<T> {}

fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
    todo!()
}
=== stdout ===
=== stderr ===
error[E0557]: feature has been removed
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^ feature has been removed
  |
  = note: removed in favor of `#![feature(adt_const_params]` and `#![feature(generic_const_exprs)]`

error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:1
  |
1 | / #![feature(const_generics)]
2 | |
3 | | trait MyTrait<T> {}
4 | |
5 | | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
6 | |     todo!()
7 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/77357.rs`

error[E0658]: a non-static lifetime is not allowed in a `const`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:5:53
  |
5 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                                     ^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
  = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable

error: aborting due to 3 previous errors

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

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

error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:1
  |
1 | / #![feature(const_generics)]
2 | |
3 | | trait MyTrait<T> {}
4 | |
5 | | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
6 | |     todo!()
7 | | }
  | |_^ consider adding a `main` function to `/home/runner/work/glacier/glacier/ices/77357.rs`

error[E0658]: a non-static lifetime is not allowed in a `const`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:5:53
  |
5 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                                     ^^
  |
  = note: see issue #76560 <rust-lang/rust#76560> for more information
  = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Some errors have detailed explanations: E0557, E0601, E0658.
For more information about an error, try `rustc --explain E0557`.
==============
@Alexendoo Alexendoo closed this Sep 1, 2021
@Alexendoo Alexendoo deleted the autofix/ices/77357.rs branch September 1, 2021 16:26
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