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

Correctly escape hashtags when running invalid_rust_codeblocks lint #136927

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

GuillaumeGomez
Copy link
Member

Fixes #136899.

We forgot to use map_line when we wrote this lint.

r? @notriddle

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 12, 2025
@rustbot
Copy link
Collaborator

rustbot commented Feb 12, 2025

This PR modifies tests/run-make/. If this PR is trying to port a Makefile
run-make test to use rmake.rs, please update the
run-make port tracking issue
so we can track our progress. You can either modify the tracking issue
directly, or you can comment on the tracking issue and link this PR.

cc @jieyouxu

@GuillaumeGomez
Copy link
Member Author

I'll actually make a ui test to check this, not sure why I thought about a run-make one...

@GuillaumeGomez GuillaumeGomez force-pushed the add-missing-hashtag-escape branch from e3695d3 to fa3e6a8 Compare February 12, 2025 14:58
@GuillaumeGomez
Copy link
Member Author

And done! :)

@rust-log-analyzer

This comment has been minimized.

// docs with the 2024 edition.
// Regression test for <https://github.com/rust-lang/rust/issues/136899>.

//@ check-pass
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
//@ check-pass
//@ check-pass
//@ edition: 2024

UI tests default to Rust 2015

Copy link
Contributor

@notriddle notriddle Feb 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd rather test both editions at once using revisions. Neither of them should warn, after all, and the combination of features and editions should be long-term easier to manage if we make a habit of parameterizing these tests whenever there's a chance of the edition affecting it.

As an example of how to do that, I wrote an edition-specific parameterized test for the span tweak:

https://github.com/notriddle/rust/blob/ac7de1a0d925af4504f9fb100be071e2fd346d13/tests/rustdoc-ui/doctest/relative-path-include-bytes-132203.rs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, I don't fully agree (after all, ## is Rust 2024 specific) but it doesn't hurt.

@GuillaumeGomez GuillaumeGomez force-pushed the add-missing-hashtag-escape branch from fa3e6a8 to 17cf100 Compare February 12, 2025 18:46
@notriddle
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Feb 12, 2025

📌 Commit 17cf100 has been approved by notriddle

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 12, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Feb 13, 2025
…-escape, r=notriddle

Correctly escape hashtags when running `invalid_rust_codeblocks` lint

Fixes rust-lang#136899.

We forgot to use `map_line` when we wrote this lint.

r? `@notriddle`
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#134090 (Stabilize target_feature_11)
 - rust-lang#135025 (Cast allocas to default address space)
 - rust-lang#135841 (Reject `?Trait` bounds in various places where we unconditionally warned since 1.0)
 - rust-lang#136217 (Mark condition/carry bit as clobbered in C-SKY inline assembly)
 - rust-lang#136699 (std: replace the `FromInner` implementation for addresses with private conversion functions)
 - rust-lang#136806 (Fix cycle when debug-printing opaque types from RPITIT)
 - rust-lang#136807 (compiler: internally merge `PtxKernel` into `GpuKernel`)
 - rust-lang#136818 (Implement `read*_exact` for `std:io::repeat`)
 - rust-lang#136927 (Correctly escape hashtags when running `invalid_rust_codeblocks` lint)
 - rust-lang#136937 (Update books)
 - rust-lang#136945 (Add diagnostic item for `std::io::BufRead`)
 - rust-lang#136947 (Reinstate nnethercote in the review rotation.)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9fe0d25 into rust-lang:master Feb 13, 2025
6 checks passed
@rustbot rustbot added this to the 1.86.0 milestone Feb 13, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Feb 13, 2025
Rollup merge of rust-lang#136927 - GuillaumeGomez:add-missing-hashtag-escape, r=notriddle

Correctly escape hashtags when running `invalid_rust_codeblocks` lint

Fixes rust-lang#136899.

We forgot to use `map_line` when we wrote this lint.

r? ``@notriddle``
@GuillaumeGomez GuillaumeGomez deleted the add-missing-hashtag-escape branch February 13, 2025 09:54
bjorn3 pushed a commit to bjorn3/rust that referenced this pull request Feb 15, 2025
Rollup of 12 pull requests

Successful merges:

 - rust-lang#134090 (Stabilize target_feature_11)
 - rust-lang#135025 (Cast allocas to default address space)
 - rust-lang#135841 (Reject `?Trait` bounds in various places where we unconditionally warned since 1.0)
 - rust-lang#136217 (Mark condition/carry bit as clobbered in C-SKY inline assembly)
 - rust-lang#136699 (std: replace the `FromInner` implementation for addresses with private conversion functions)
 - rust-lang#136806 (Fix cycle when debug-printing opaque types from RPITIT)
 - rust-lang#136807 (compiler: internally merge `PtxKernel` into `GpuKernel`)
 - rust-lang#136818 (Implement `read*_exact` for `std:io::repeat`)
 - rust-lang#136927 (Correctly escape hashtags when running `invalid_rust_codeblocks` lint)
 - rust-lang#136937 (Update books)
 - rust-lang#136945 (Add diagnostic item for `std::io::BufRead`)
 - rust-lang#136947 (Reinstate nnethercote in the review rotation.)

r? `@ghost`
`@rustbot` modify labels: rollup
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-run-make Area: port run-make Makefiles to rmake.rs S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rustdoc: Failed to parse rust code block with ## in 2024
6 participants