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

ices/105231.rs: fixed with errors #1608

Merged
merged 1 commit into from
Jun 21, 2023
Merged

ices/105231.rs: fixed with errors #1608

merged 1 commit into from
Jun 21, 2023

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#105231

struct A<T>(B<T>);
struct B<T>(A<A<T>>);
trait Foo {}
impl<T> Foo for T where T: Send {}
impl Foo for B<u8> {}
fn main() {}
=== stdout ===
=== stderr ===
error[E0072]: recursive types `A` and `B` have infinite size
 --> /home/runner/work/glacier/glacier/ices/105231.rs:1:1
  |
1 | struct A<T>(B<T>);
  | ^^^^^^^^^^^ ---- recursive without indirection
2 | struct B<T>(A<A<T>>);
  | ^^^^^^^^^^^ ------- recursive without indirection
  |
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
  |
1 ~ struct A<T>(Box<B<T>>);
2 ~ struct B<T>(Box<A<A<T>>>);
  |

error[E0275]: overflow evaluating the requirement `A<A<A<A<A<A<A<...>>>>>>>: Send`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`105231`)
note: required because it appears within the type `B<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<u8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
 --> /home/runner/work/glacier/glacier/ices/105231.rs:2:8
  |
2 | struct B<T>(A<A<T>>);
  |        ^

error: aborting due to 2 previous errors

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

=== stdout ===
=== stderr ===
error[E0072]: recursive types `A` and `B` have infinite size
 --> /home/runner/work/glacier/glacier/ices/105231.rs:1:1
  |
1 | struct A<T>(B<T>);
  | ^^^^^^^^^^^ ---- recursive without indirection
2 | struct B<T>(A<A<T>>);
  | ^^^^^^^^^^^ ------- recursive without indirection
  |
help: insert some indirection (e.g., a `Box`, `Rc`, or `&`) to break the cycle
  |
1 ~ struct A<T>(Box<B<T>>);
2 ~ struct B<T>(Box<A<A<T>>>);
  |

error[E0275]: overflow evaluating the requirement `A<A<A<A<A<A<A<...>>>>>>>: Send`
  |
  = help: consider increasing the recursion limit by adding a `#![recursion_limit = "256"]` attribute to your crate (`105231`)
note: required because it appears within the type `B<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<A<u8>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>`
 --> /home/runner/work/glacier/glacier/ices/105231.rs:2:8
  |
2 | struct B<T>(A<A<T>>);
  |        ^

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0072, E0275.
For more information about an error, try `rustc --explain E0072`.
==============
@JohnTitor JohnTitor merged commit 12cde9c into master Jun 21, 2023
@JohnTitor JohnTitor deleted the autofix/ices/105231.rs branch June 21, 2023 09:17
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.

None yet

2 participants