Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code samples in demo #779

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

Code samples in demo #779

wants to merge 1 commit into from

Conversation

emilk
Copy link
Owner

@emilk emilk commented Oct 9, 2021

I thought something like this would be very nice to show to beginners:

code-samples

However, the clever macro tricks I use to get the source code excerpts have some problems: file!() gives us a relative path when running cargo check, but an absolute path when running cargo test.

I may have to look for another way to accomplish this.

@ryo33
Copy link

ryo33 commented Dec 5, 2022

I've opened a topic about the file!() behavior at
https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/file!.28.29.20output.20varies.20in.20condition/near/313877507

@emilk If you have any additions or additional discussion, I would be happy if you would join.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants