Giter VIP home page Giter VIP logo

Comments (6)

ProfFan avatar ProfFan commented on July 26, 2024

Strange, this runs even after I removed the doctest itself, target folder, as well as doing a cargo clean. Does cargo keep a cache of this test somewhere outside of the project?

from rust.

workingjubilee avatar workingjubilee commented on July 26, 2024

...weird.

can you provide a version that compiles and repros?

from rust.

ProfFan avatar ProfFan commented on July 26, 2024

...weird.

can you provide a version that compiles and repros?

https://github.com/ProfFan/icm426xx on main

I don't know if this is my macOS being funky, this is the only system I have.

Just run cargo test and this should trigger?

from rust.

ProfFan avatar ProfFan commented on July 26, 2024

nvm, it's this trick from stackoverflow that got me:

#![doc = include_str!(concat!(env!("CARGO_MANIFEST_DIR"), "/README.md"))]

This results in doctest trying to run the code snippet from README.

However this problem is still valid: the displayed line number is clearly incorrect. It shows the line number of my disabled test in the source code.

from rust.

ProfFan avatar ProfFan commented on July 26, 2024

XREF: https://stackoverflow.com/questions/69117817/how-can-i-tell-cargo-to-run-code-test-in-documentation-in-my-readme-md

Same problem in this post.

from rust.

tgross35 avatar tgross35 commented on July 26, 2024

Similar but not exact issue #81070

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.