Can one patch dependent crate versions?

Hi,
in my own rust crate I've seen quite a long dependency tree. The last part of it looks like this:
memoffset 0.2.1 -> crossbeam-epoch 0.7.1 -> crossbeam-deque 0.6.3 -> rayon 1.1.0 -> ....

Is there any way to patch the memoffset crate version used by crossbeam-epoch to a newer one using the

[patch.crates-io]

part of the cargo toml? What I've seen in the documentation and all what I've tried gives the impression you can only patch the same version of the crate with a local version or a git-repo version - but the version numbers need to match. Is this understanding correct? Or is there another way to achieve this?

I'd like to patch memoffset to it's latest version.

Thanks in advance.

crossbeam-epoch 0.7.1 depends on memoffset ^0.2, so you can't use any newer version, they will be semver incompatible. Although, you can simply update rayon to 1.3 - this will pull newer versions of its dependencies.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.