Description
Observed behavior:
Receiving the following error when attempting to compile the sample program.
Expected behavior:
Indicate that there is a trait bound error.
rustc 1.16.0 (30cf806ef 2017-03-10)
error[E0275]: overflow evaluating the requirement `TransmitterInternal: std::marker::Send`
--> <anon>:22:16
|
22 | fn g(x: Memo) {f(x)}
| ^
|
= note: consider adding a `#![recursion_limit="128"]` attribute to your crate
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Arc<TransmitterInternal>`
= note: required because it appears within the type `SlabRef`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::ptr::Unique<SlabRef>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<SlabRef>`
= note: required because it appears within the type `std::vec::Vec<SlabRef>`
= note: required because it appears within the type `TransmitterInternal`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::sync::Arc<TransmitterInternal>`
= note: required because it appears within the type `SlabRef`
= note: required because of the requirements on the impl of `std::marker::Send` for `std::ptr::Unique<SlabRef>`
= note: required because it appears within the type `alloc::raw_vec::RawVec<SlabRef>`
= note: required because it appears within the type `std::vec::Vec<SlabRef>`
= note: required because it appears within the type `TransmitterInternal`
= note: required because of the requirements on the impl of `std::marker::Sync` for `std::sync::Arc<TransmitterInternal>`
= note: required because it appears within the type `SlabRef`
...
Minimal reproduction case:
https://is.gd/KgD5Tk
Many thanks to the tireless efforts of @stephaneyfx in creating the repro above!
Bonus round
I haven't yet figured out a minimal repro for this second part, but if I'm interpreting correctly, it's possible that a variant of this endless recursion error does not require a trait bound error to be triggered. (noob warning: it's possible that the omission of +Send+Sync in 4ab0fdf is actually a trait bounds error, but I don't presently understand why)
Non-minimal repro:
https://travis-ci.org/dnorman/unbase/jobs/209643435#L240
Minimal change that fixed it:
dnorman/unbase@47c68bf
https://travis-ci.org/dnorman/unbase/jobs/209649602#L228