Allow test to be built with build-std#97037
Conversation
`test` requires the feature `restricted_std` to be enabled in order to be built with build-std.
|
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
|
r? @thomcc (rust-highfive has picked a reviewer for you, use r? to override) |
|
I believe |
|
I am actually interested in using The |
You can write a proc macro expanding to |
|
I'm not familiar with r? rust-lang/libs |
|
I don't think this alone will do what you want. rust-lang/wg-cargo-std-aware#72 (comment) |
|
Oh, and for context it turns out |
|
I'm a lot more familiar with restricted_std now. I agree with the consensus that this will likely not solve the issue, but I'll take a closer look (after the new year). r? @thomcc |
|
I don't mind adding IOW, please actually test this on a restricted_std target -- it compiling successfully is a guarantee of very little. We also will need to have a t-libs meeting to discuss this probably, but I'd like to see what it takes to support these targets -- at the moment we don't have enough info for me to feel like that would be very productive. (Important note for future readers: I believe this doesn't change our stable support, even if -Zbuild-std stabilizes: In order to actually use this to run tests on a restricted_std target, I believe the user's crate will likely need a Anyway, please do the testing, and then reassign for my review with at-rustbot ready. @rustbot author |
|
@jschwe any updates on this? |
|
I haven't had the time to further pursue this, so I'll be closing this PR for now. |
testrequires the featurerestricted_stdto be enabled in order to be built with build-std.For me this solves issue rust-lang/wg-cargo-std-aware#72, at least in so far as that building the test crate with
build-stdis successfull.I am not familiar with
restricted_std, but enabling it doesn't seem to cause any test failures. Would this be acceptable, or is there something else I'm not aware of, that makes addingrestricted_stdnot desirable?