Skip to content

Use Attrs::docs in runnables instead of DocCommentsOwner #6834

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

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Dec 11, 2020

I figured that we should probably move as much of the doc usage to the HIR as possible hence this PR. If we should keep this AST-based feel free to close.

This change does have the nice(but not really useful as I doubt anyones gonna write doc tests like these) side effect that these two doc string snippets allow being run now.
image
image

fn into(self) -> String {
self.0
impl From<Documentation> for String {
fn from(Documentation(string): Documentation) -> Self {
Copy link
Contributor

Choose a reason for hiding this comment

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

This is a little awkward. It took me a second to remember that this was valid rust.

@kjeremy
Copy link
Contributor

kjeremy commented Dec 11, 2020

LGTM. The more we can move to HIR the better.

@kjeremy
Copy link
Contributor

kjeremy commented Dec 11, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 11, 2020

@bors bors bot merged commit 91bf15a into rust-lang:master Dec 11, 2020
@Veykril Veykril deleted the noast-docs branch December 11, 2020 20:03
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