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

Add more rust_private attributes #56559

Open
wants to merge 1 commit into
base: master
from

Conversation

Projects
None yet
3 participants
@ljedrz
Contributor

ljedrz commented Dec 6, 2018

I'm working on enabling clippy in x.py and the usage of is_xid_start and is_xid_continue in the components is one of the obstacles. If we are not planning to remove this attribute then it makes sense to use it for these compiler internals, as it is already done with some of the others.

If for any reason this is undesirable, there is probably some way of working around it; otherwise it seems like the most straightforward option.

r? @alexcrichton

@ljedrz ljedrz force-pushed the ljedrz:more_rustc_private branch from 253e73f to 00367d5 Dec 6, 2018

@ljedrz ljedrz changed the title from Add rust_private attrib to rustc, macros and syntax to Add more rust_private attributes Dec 6, 2018

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 6, 2018

I think this is probably indicative of other problems perhaps? These attributes shouldn't be necessary due to how rustbuild builds the compiler crates, and this attribute would otherwise be needed by a much larger number of crates.

I think that clippy integration into rustc will be somewhat difficult, but it'll likely for sure need some tight integration with rustbuild itself!

@ljedrz

This comment has been minimized.

Contributor

ljedrz commented Dec 6, 2018

I am trying an approach similar to check (since it's not an issue there); I'm wondering if it has something to do with the cargo process run from within clippy, but the arguments I've tried to "smuggle in" so far (RUSTC_FORCE_UNSTABLE and RUSTC_BOOTSTRAP) didn't do the trick.

@ljedrz

This comment has been minimized.

Contributor

ljedrz commented Dec 7, 2018

@alexcrichton An additional effect of this change is the improved ability to execute cargo (clippy/fix) on rustc crates individually; this is desirable if we want to keep them as modular as possible. For example, it allows cargo fix --edition to automatically migrate libproc_macro to the 2018 edition.

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 10, 2018

Is this still necessary or has it largely moved over to #56595?

@ljedrz

This comment has been minimized.

Contributor

ljedrz commented Dec 10, 2018

It is still needed in order for all components to work with x.py clippy with the other PR, but I kept it separate in case there is a better way to achieve this. This PR is also useful on its own, as mentioned in the previous comment.

@alexcrichton

This comment has been minimized.

Member

alexcrichton commented Dec 11, 2018

Hm well as I mentioned before these feature gates should not be necessary, and indicates a bug in the build setup if they're otherwise required. I haven't had a chance to dig into the other PR yet, but if it requires this one then I think that the other PR needs some more work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment