Skip to content

libc docs fail to build with last nightly #961

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
glandium opened this issue Apr 5, 2018 · 2 comments
Closed

libc docs fail to build with last nightly #961

glandium opened this issue Apr 5, 2018 · 2 comments

Comments

@glandium
Copy link
Contributor

glandium commented Apr 5, 2018

See this log from building PR #960 : https://travis-ci.org/rust-lang/libc/jobs/362429880
I was able to reproduce locally with current master and last nightly. Yesterday's nightly worked fine.

example from the log:

error[E0204]: the trait `Copy` may not be implemented for this type
   --> src/macros.rs:44:14
    |
44  |           impl ::dox::Copy for $i {}
    |                ^^^^^^^^^^^
    | 
   ::: src/unix/mod.rs:19:1
    |
19  | / s! {
20  | |     pub struct group {
21  | |         pub gr_name: *mut ::c_char,
    | |         -------------------------- this field does not implement `Copy`

I'm not sure whether it's a legitimate regression in rustdoc that broke the magic happening in dox.rs or if it's a legitimate problem in dox.rs.

@glandium
Copy link
Contributor Author

glandium commented Apr 5, 2018

So the funny thing is that this breaks on anything older than today's nightly:

error[E0206]: the trait `Copy` may not be implemented for this type
  --> src/dox.rs:22:22
   |
22 |     impl<T> Copy for *mut T {}
   |                      ^^^^^^ type is not a structure or enumeration

error[E0206]: the trait `Copy` may not be implemented for this type
  --> src/dox.rs:27:22
   |
27 |     impl<T> Copy for *const T {}
   |                      ^^^^^^^^ type is not a structure or enumeration
error[E0206]: the trait `Copy` may not be implemented for this type
   --> src/dox.rs:51:19
    |
51  |               $mac!(u8);
    |  ___________________^
52  | |             $mac!(u16);
53  | |             $mac!(u32);
54  | |             $mac!(u64);
...   |
152 | |             }
153 | |             impl Copy for $i {}
    | |____________________________^ type is not a structure or enumeration
...
159 |       each_int!(impl_traits);
    |       ----------------------- in this macro invocation

etc.

@glandium
Copy link
Contributor Author

glandium commented Apr 5, 2018

So, the breaking compiler change is rust-lang/rust#48171 , and this very issue was worked around for the compiler only with #951. And the third paragraph in that issue even mentions that Clone and Copy impls will be necessary for primitive types.

I guess the question now is whether we care about the documentation generation working with nightlies before that change.

bors added a commit that referenced this issue Apr 5, 2018
Add dox::{Copy, Clone} impls for pointer and integer types.

Fixes: #961
bors added a commit that referenced this issue Apr 5, 2018
Add dox::{Copy, Clone} impls for pointer and integer types.

Fixes: #961
bors added a commit that referenced this issue Apr 5, 2018
Add dox::{Copy, Clone} impls for pointer and integer types.

Fixes: #961
@bors bors closed this as completed in #962 Apr 5, 2018
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant