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

Closed
wants to merge 1 commit into from

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#77357

trait MyTrait<T> {}

fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
    todo!()
}
=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:1
  |
1 | / trait MyTrait<T> {}
2 | |
3 | | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
4 | |     todo!()
5 | | }
  | |_^ 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:3:53
  |
3 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                                     ^^
  |
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: add `#![feature(const_generics)]` to the crate attributes to enable

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0601]: `main` function not found in crate `77357`
 --> /home/runner/work/glacier/glacier/ices/77357.rs:1:1
  |
1 | / trait MyTrait<T> {}
2 | |
3 | | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
4 | |     todo!()
5 | | }
  | |_^ 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:3:53
  |
3 | fn bug<'a, T>() -> &'static dyn MyTrait<[(); { |x: &'a u32| { x }; 4 }]> {
  |                                                     ^^
  |
  = note: see issue #44580 <rust-lang/rust#44580> for more information
  = help: add `#![feature(const_generics)]` to the crate attributes to enable

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0601, E0658.
For more information about an error, try `rustc --explain E0601`.
==============
@Alexendoo
Copy link
Member

48b35b2

@Alexendoo Alexendoo closed this Dec 28, 2020
@Alexendoo Alexendoo deleted the autofix/ices/77357.rs branch December 28, 2020 14:32
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