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

Use the correct edition for syntax highlighting doctests #89277

Merged
merged 2 commits into from
Sep 28, 2021

Conversation

jyn514
Copy link
Member

@jyn514 jyn514 commented Sep 26, 2021

Previously it would unconditionally use edition 2015, which was incorrect.

Helps with #89135 in that you can now override the doctest to be 2018 edition instead of being forced to fix the error. This doesn't resolve any of the deeper problems that rustdoc disagrees with most rust users on what a code block is.

cc @Mark-Simulacrum

Previously, only the raw string and the `is_ignore` field were
preserved, which made it hard to recover anything else.
@jyn514 jyn514 added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. A-doctests Area: Documentation tests, run by rustdoc labels Sep 26, 2021
@rust-highfive
Copy link
Collaborator

r? @GuillaumeGomez

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 26, 2021
Previously it would unconditionally use edition 2015, which was
incorrect.
@Mark-Simulacrum Mark-Simulacrum added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Sep 26, 2021
@Mark-Simulacrum
Copy link
Member

beta-nominating, needed for 2021 edition

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+

@bors
Copy link
Contributor

bors commented Sep 26, 2021

📌 Commit 6f087ae has been approved by GuillaumeGomez

@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 Sep 26, 2021
@bors
Copy link
Contributor

bors commented Sep 28, 2021

⌛ Testing commit 6f087ae with merge 7b10746...

@bors
Copy link
Contributor

bors commented Sep 28, 2021

☀️ Test successful - checks-actions
Approved by: GuillaumeGomez
Pushing 7b10746 to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Sep 28, 2021
@bors bors merged commit 7b10746 into rust-lang:master Sep 28, 2021
@rustbot rustbot added this to the 1.57.0 milestone Sep 28, 2021
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (7b10746): comparison url.

Summary: This benchmark run did not return any relevant changes.

If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf.

@rustbot label: -perf-regression

@jyn514 jyn514 deleted the codeblock-edition branch September 28, 2021 12:53
@apiraino
Copy link
Contributor

Beta backport accepted as per compiler team on Zulip

@rustbot label +beta-accepted

@rustbot rustbot added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Sep 30, 2021
ehuss pushed a commit to ehuss/rust that referenced this pull request Oct 4, 2021
…Gomez

Use the correct edition for syntax highlighting doctests

Previously it would unconditionally use edition 2015, which was incorrect.

Helps with rust-lang#89135 in that you can now override the doctest to be 2018 edition instead of being forced to fix the error. This doesn't resolve any of the deeper problems that rustdoc disagrees with most rust users on what a code block is.

cc `@Mark-Simulacrum`
@ehuss ehuss mentioned this pull request Oct 4, 2021
ehuss added a commit to ehuss/rust that referenced this pull request Oct 4, 2021
The backport of rust-lang#89277 needed adjustment due to another
PR (rust-lang#87915 - Use smaller spans for some structured suggestions)
causing the test to have a slightly different span.
@ehuss ehuss removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Oct 4, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Oct 4, 2021
[beta] Beta rollup

* Fix WinUWP std compilation errors due to I/O safety rust-lang#88587
* Disable RemoveZsts in generators to avoid query cycles rust-lang#88979
* Disable the evaluation cache when in intercrate mode rust-lang#88994
* Fix linting when trailing macro expands to a trailing semi rust-lang#88996
* Don't use projection cache or candidate cache in intercrate mode rust-lang#89125
* 2229: Mark insignificant dtor in stdlib rust-lang#89144
* Temporarily rename int_roundings functions to avoid conflicts rust-lang#89184
* [rfc 2229] Drop fully captured upvars in the same order as the regular drop code rust-lang#89208
* Use the correct edition for syntax highlighting doctests rust-lang#89277
* Don't normalize opaque types with escaping late-bound regions rust-lang#89285
* Update Let's Encrypt ROOT CA certificate in dist-(i686|x86_64)-linux docker images rust-lang#89486

Cargo update:
* - [beta] 1.56 backports (rust-lang/cargo#9958)
* - [beta] Revert "When a dependency does not have a version, git or path… (rust-lang/cargo#9912)
* - [beta] Fix rustc --profile=dev unstable check. (rust-lang/cargo#9901)
@Mark-Simulacrum Mark-Simulacrum modified the milestones: 1.57.0, 1.56.0 Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-doctests Area: Documentation tests, run by rustdoc A-lint Area: Lints (warnings about flaws in source code) such as unused_mut. beta-accepted Accepted for backporting to the compiler in the beta channel. merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

9 participants