You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Auto merge of #2028 - IsaacWoods:master, r=JohnTitor
Fix error when building rustc with a custom libc
When pulling a custom `libc` into a `rustc` build (with the `rustc-dep-of-std` feature set), the following error occurs:
```
error: unused attribute
--> /hdd/libc/src/lib.rs:29:1
|
29 | #![no_std]
| ^^^^^^^^^^
|
= note: `-D unused-attributes` implied by `-D warnings`
error: crate-level attribute should be in the root module
--> /hdd/libc/src/lib.rs:29:1
|
29 | #![no_std]
| ^^^^^^^^^^
```
I think this is because both the `no_std` and `no_core` attributes are specified, although the error message doesn't make this very clear. This PR changes this so `no_std` is only supplied when the `rustc-dep-of-std` feature is not.
0 commit comments