netvl / xml-rs

An XML library in Rust
MIT License
461 stars 113 forks source link

`cfg(doctest)` is experimental and subject to change #191

Closed sectorsize512 closed 4 years ago

sectorsize512 commented 4 years ago

I'm getting the following error when compiling the crate (as part of cargo build of my code):

error[E0658]: `cfg(doctest)` is experimental and subject to change
 --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/xml-rs-0.8.3/src/lib.rs:9:7
  |
9 | #[cfg(doctest)]
  |       ^^^^^^^
  |
  = note: for more information, see https://github.com/rust-lang/rust/issues/62210

error[E0658]: `cfg(doctest)` is experimental and subject to change
  --> /root/.cargo/registry/src/github.com-1ecc6299db9ec823/xml-rs-0.8.3/src/lib.rs:13:7
   |
13 | #[cfg(doctest)]
   |       ^^^^^^^
   |
   = note: for more information, see https://github.com/rust-lang/rust/issues/62210

Here is the version:

# rustc --version
rustc 1.39.0

Any idea what can be wrong?

netvl commented 4 years ago

@sectorsize512 it seems that your compiler is a bit old. This attribute has been stabilized in rustc 1.40: https://github.com/rust-lang/rust/commit/92df638162b7ccea6f97a8e1287ed05c5c0818b4

sectorsize512 commented 4 years ago

Right, works with the latest compiler (1.44), thanks.

jreindel commented 3 years ago

Really new user to rust here. Seeing this error. I just used '''rustup update stable''' to go from something older (no idea what) to 1.52.1 but I'm still getting this error. Did a cargo clean. What am I missing? Should I be seeing this error if the issues was resolved with 1.40 and I just updated to 1.52.1?

netvl commented 3 years ago

Sorry, I'm not sure what could be wrong on your setup. Could it be that you use not the updated stable toolchain but some other, not yet updated?

jreindel commented 3 years ago

I got this resolved. I don't remember the exact step(s) to solution, but I found out I had installed, but not enabled the newest version. I don't recall what I did to get the correct version active.