Skip to content

maxence-cornaton/quick-xml-feature-unification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

An example of feature unification conflict with quick-xml

  • Crate A depends on quick-xml with encoding feature enabled
  • Crate B depends on quick-xml with encoding feature not enabled
  • Parent crate depends on both A and B crates

Trying to build the parent crate (cargo build) will lead to the following error:

error[E0599]: no method named `unescape_value` found for struct `Attribute` in the current scope                                                  
  --> B\src\lib.rs:9:7
   |
6  | /     Attribute {
7  | |         key: QName(b"key"),
8  | |         value: Cow::Borrowed(b"value"),
9  | |     }.unescape_value()
   | |______-^^^^^^^^^^^^^^
   |
help: there is a method `decode_and_unescape_value` with a similar name, but with different arguments
  --> C:\Users\Maxence\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\quick-xml-0.37.5\src\events\attributes.rs:79:5
   |
79 |     pub fn decode_and_unescape_value(&self, decoder: Decoder) -> XmlResult<Cow<'a, str>> {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0599`.

However, removing the dependency on A and recompiling the parent crate successes. This is a feature unification conflict.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages