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

rustdoc: Stabilize `edition` annotation. #66238

Merged
merged 1 commit into from Nov 18, 2019

Conversation

@ehuss
Copy link
Contributor

ehuss commented Nov 9, 2019

The rustdoc edition annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a rust annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:

/// ```edition2018
/// // This code block was ignored on stable.
/// ```

/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```

AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.

Closes #65980

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 10, 2019

Thanks!

Looks good to me. Let's ask for @QuietMisdreavus' opinion as well and then r=me.

@GuillaumeGomez

This comment has been minimized.

Copy link
Member

GuillaumeGomez commented Nov 17, 2019

Thanks!

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 17, 2019

📌 Commit 1907589 has been approved by GuillaumeGomez

GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 17, 2019
…GuillaumeGomez

rustdoc: Stabilize `edition` annotation.

The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:

```rust
/// ```edition2018
/// // This code block was ignored on stable.
/// ```

/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```
```

AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.

Closes rust-lang#65980
bors added a commit that referenced this pull request Nov 17, 2019
Rollup of 4 pull requests

Successful merges:

 - #54733 (Stabilize rustdoc theme options)
 - #66238 (rustdoc: Stabilize `edition` annotation.)
 - #66430 ([doc] Fix the source code highlighting on source comments)
 - #66461 (Add explanation message for E0641)

Failed merges:

r? @ghost
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

⌛️ Testing commit 1907589 with merge d67ca28...

bors added a commit that referenced this pull request Nov 18, 2019
rustdoc: Stabilize `edition` annotation.

The rustdoc `edition` annotation is currently ignored on stable. This means that the tests will be ignored, unless there is a `rust` annotation, then it will use the global edition. I suspect this was just an oversight during the edition stabilization, but I don't know. Example:

```rust
/// ```edition2018
/// // This code block was ignored on stable.
/// ```

/// ```rust,edition2018
/// // This code block would use whatever edition is passed on the command line.
/// ```
```

AFAIK, it is not possible to write a test that verifies stable behavior, as all tests appear to set RUSTC_BOOTSTRAP which forces all tests to run as "nightly", even on a stable release.

Closes #65980
@bors

This comment has been minimized.

Copy link
Contributor

bors commented Nov 18, 2019

☀️ Test successful - checks-azure
Approved by: GuillaumeGomez
Pushing d67ca28 to master...

@bors bors added the merged-by-bors label Nov 18, 2019
@bors bors merged commit 1907589 into rust-lang:master Nov 18, 2019
5 checks passed
5 checks passed
homu Test successful
Details
pr Build #20191109.4 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (Linux x86_64-gnu-tools) Linux x86_64-gnu-tools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.