We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Not sure if this is a bug or something I missed in my code, but seems to be the same as #29844. Issue present in stable, beta and nightly.
https://play.rust-lang.org/?gist=5d30e353c7fac8f23e871367f774f9b0&version=stable&backtrace=0
#[derive(Debug)] enum E1<T> { V1(T), V2(Box<E1<E2<T>>>) } #[derive(Debug)] enum E2<T> { V1(usize, T), V2(usize, T, T) } fn main() { let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); println!("{:?}", wub); }
Issues on stable (similar issues on beta and nightly):
:14:9: 14:12 error: overflow while adding drop-check rules for E1<&str> [E0320] :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~ :14:9: 14:12 note: overflowed on enum E2 variant V1 field #0 type: usize :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~ :14:15: 14:57 error: overflow while adding drop-check rules for E1<&str> [E0320] :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :14:15: 14:57 note: overflowed on enum E2 variant V1 field #0 type: usize :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :14:22: 14:56 error: overflow while adding drop-check rules for Box<E1<E2<&str>>> [E0320] :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :14:22: 14:56 note: overflowed on enum E1 variant V1 field #0 type: E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<E2<&str>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :14:31: 14:55 error: overflow while adding drop-check rules for E1<E2<&str>> [E0320] :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub")))); ^~~~~~~~~~~~~~~~~~~~~~~~ :14:31: 14:55 note: overflowed on enum E2 variant V1 field #0 type: usize :14 let wub = E1::V2(Box::new(E1::V1(E2::V1(1, "wub"))));
The text was updated successfully, but these errors were encountered:
Slightly simplified version of code producing same issue.
#[derive(Debug)] enum A<T> { A1(T), A2(Box<A<B<T>>>) } #[derive(Debug)] enum B<T> { B(T) } fn main() { let wub = A::A2(Box::new(A::A1(B::B("wub")))); println!("{:?}", wub); }
https://play.rust-lang.org/?gist=b5faaff96db3a386eb7906461f81d5a8&version=stable&backtrace=0
Sorry, something went wrong.
Even more minimal:
enum A<T> { A1(T), A2(Box<A<::std::marker::PhantomData<T>>>) } fn main() { A::A1(()); }
I think this is a duplicate of #4287
Closing in favor of #4287.
No branches or pull requests
Not sure if this is a bug or something I missed in my code, but seems to be the same as #29844. Issue present in stable, beta and nightly.
https://play.rust-lang.org/?gist=5d30e353c7fac8f23e871367f774f9b0&version=stable&backtrace=0
Issues on stable (similar issues on beta and nightly):
The text was updated successfully, but these errors were encountered: