-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Doc-examples using #[doc]
do not have triple backticks stripped before being compiled
#78964
Comments
cc @GuillaumeGomez , I think #76154 broke this. |
#[doc]
do not have triple backticks stripped before being compiled
@GuillaumeGomez How is one sup[posed to combine |
@juliankrieger the 4 space indent is being interpreted as a code block. Then the rust compiler is run on the block and gives an error about the backticks. The fix is to remove (or just decrease) the indentation. |
I'm afraid I don't quite understand, can you provide a tiny example that works with |
You can't have indented codeblocks with tags. |
#![doc = r#"
```rust,no_run
// Lots of rust code
```
"#] (or use backslashes and |
Nightly code fails to compile.
Code
I tried this code:
I expected to see this happen: Compiling and working like it does on stable.
Instead, compiler says:
Version it worked on
It most recently worked on: rustc 1.49.0-nightly (ffa2e7a 2020-10-24)
Version with regression
rustc --version --verbose
:The text was updated successfully, but these errors were encountered: