Skip to content

csearch::get_item_attrs() seems to always be blank for const items #19773

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

Closed
tomjakubowski opened this issue Dec 12, 2014 · 1 comment · Fixed by #19793
Closed

csearch::get_item_attrs() seems to always be blank for const items #19773

tomjakubowski opened this issue Dec 12, 2014 · 1 comment · Fixed by #19793

Comments

@tomjakubowski
Copy link
Contributor

This prevents rustdoc from inlining docs from another crate's constant items.

example code:

// foo.rs
#![crate_type="lib"]
/// Docs for a const
pub const FOO: &'static str = "Foo bar";
// bar.rs
#![crate_type="lib"]
extern crate foo;

pub use foo::FOO;

(This issue is unrelated to the myriad issues rustdoc currently has with constants, and came up while I was fixing them).

tomjakubowski added a commit to tomjakubowski/rust that referenced this issue Dec 12, 2014
Build `clean::ConstantItem` values in the `inline` module and
pretty-print the AST for inlined const items.

Doc strings are still missing from inlined constants (see rust-lang#19773).

Partially address rust-lang#18156, rust-lang#19722, rust-lang#19185

Fix rust-lang#15821
@alexcrichton
Copy link
Member

I think we're missing a call to encode_attributes here

brson added a commit to brson/rust that referenced this issue Dec 12, 2014
Build `clean::ConstantItem` values in the `inline` module and
pretty-print the AST for inlined const items.

Doc strings are still missing from inlined constants (see rust-lang#19773).

Partially address rust-lang#18156, rust-lang#19722, rust-lang#19185

Fix rust-lang#15821

r? @alexcrichton
brson added a commit to brson/rust that referenced this issue Dec 13, 2014
Build `clean::ConstantItem` values in the `inline` module and
pretty-print the AST for inlined const items.

Doc strings are still missing from inlined constants (see rust-lang#19773).

Partially address rust-lang#18156, rust-lang#19722, rust-lang#19185

Fix rust-lang#15821

r? @alexcrichton
tomjakubowski added a commit to tomjakubowski/rust that referenced this issue Dec 13, 2014
brson added a commit to brson/rust that referenced this issue Dec 15, 2014
Build `clean::ConstantItem` values in the `inline` module and
pretty-print the AST for inlined const items.

Doc strings are still missing from inlined constants (see rust-lang#19773).

Partially address rust-lang#18156, rust-lang#19722, rust-lang#19185

Fix rust-lang#15821

r? @alexcrichton
brson added a commit to brson/rust that referenced this issue Dec 15, 2014
Fix rust-lang#19773

Together with rust-lang#19774 (which this is rebased on):

Fix rust-lang#18156, fix rust-lang#19722, fix rust-lang#19185

r? @alexcrichton (since this was your suggestion!)
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 a pull request may close this issue.

2 participants