The thing is, crossbeam_channel is its own crate, which can be used standalone. It is also included by crossbeam and re-exported as crossbeam::channel.
So what you see there is the documentation of the standalone crate, for which the example is correctly written. I'm not sure how to address/fix this
Oh, I see. So the example it will depend on which crate you choose? Ok, I am bit too new to Rust to suggest a possible solution, but it did confuse me. Maybe a note somewhere to explain the situation?
I suppose this cannot be easily fixed, in fact. The reason is that crossbeam crate doesn't hold any documentation on channel - it copies the one from crossbeam_channel, since it is the reexport, not the containment.
Still, since they are "friendly" crates in the same namespace, the example could have a comment noting // If you use this crate via `crossbeam::channel`, yadda yadda...