Stream: t-compiler/help

Topic: Github PR


sHaDoW (Jul 10 2020 at 01:26, on Zulip):

If this is not the place to ask for help about this topic, please redirect me to where i can get help for my problem. :)

I'm very new to contributing code in general, and a noob at github. I created 2 functions for rust that i thought were necessary, and i tried to submit them, but the "pr checks" doesn't seem to accept the code, i tested the code on my computer and it works fine, it's only two functions nothing crazy (it should run). I've been racking my brain about why it's not building, it keeps saying "error: function is never used", that being the only 2 errors, (one for each function). I have no idea if i'm being dumb, but i may need some guidance on how to contribute code. If you want to see the code in question the link is: (https://github.com/rust-lang/rust/pull/74178).

lcnr (Jul 10 2020 at 06:22, on Zulip):

we use https://github.com/rust-lang/rustfmt/ to format both the standard library + the compiler.

You can run ./x.py fmt to fix the current errors.

Joshua Nelson (Jul 10 2020 at 16:48, on Zulip):

If it says function not used, that might not show with fmt. Try x.py check which should reproduce the error.

Joshua Nelson (Jul 10 2020 at 16:53, on Zulip):

You may also have forgotten to put pub on the functions, without that they won't be usable outside the standard library itself

Last update: Sep 28 2020 at 15:45UTC