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

Doc comments to attribute conversion without syntactic sugar #19420

Closed
l0kod opened this issue Nov 30, 2014 · 6 comments
Closed

Doc comments to attribute conversion without syntactic sugar #19420

l0kod opened this issue Nov 30, 2014 · 6 comments
Labels
A-parser Area: The parsing of Rust source code to an AST

Comments

@l0kod
Copy link
Contributor

l0kod commented Nov 30, 2014

Like the doc said and then refute, /// Foo turns into #[doc="/// Foo"] which is a bug. It should turns into #[doc="Foo"] (without the ///). Same apply for /** … */.

This is an issue for macro using the meta matcher (cf. #13067) to insert doc into generated code.

cc #18376
cc #10642
cc #6444

@l0kod
Copy link
Contributor Author

l0kod commented Nov 30, 2014

cc @alexcrichton

@l0kod
Copy link
Contributor Author

l0kod commented Dec 2, 2014

cc @steveklabnik

@kmcallister kmcallister added the A-parser Area: The parsing of Rust source code to an AST label Jan 25, 2015
@TyOverby
Copy link
Contributor

Another interesting symptom is that it doesn't insert any whitespace. Everything gets run together on one line making it look like this in the docs.

/// Sets the global velocity damping. /// /// Defaults to 1.0 (no damping). /// /// This value is the fraction of velocity a body should have after 1 /// second. A value of 0.9 would mean that each second, a body would have /// 90% of the velocity it had the previous second.

@huonw huonw added T-tools T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jan 8, 2016
@huonw
Copy link
Member

huonw commented Jan 8, 2016

I believe this desugaring is still the case, although I'm not sure I understand why this affects the use of meta (this issue is a bit old, but maybe you remember, @l0kod?).

@alexcrichton alexcrichton removed T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-tools labels Jan 27, 2016
@sanmai-NL
Copy link

@steveklabnik: Should this old issue receive additional tags and/or be closed?

@steveklabnik
Copy link
Member

yup, without more info, gonna consider this one closed. @l0kod if you still have something here, please just open a new issue with the current context, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-parser Area: The parsing of Rust source code to an AST
Projects
None yet
Development

No branches or pull requests

7 participants