-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Unify variadic errors #26503
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
Unify variadic errors #26503
Conversation
@@ -380,6 +380,23 @@ fn main() { | |||
``` | |||
"##, | |||
|
|||
E0045: r##" | |||
Variadic parameters are only allowed in extern "C" code. Example of | |||
erroneous codes: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Examples of erroneous code"
@Manishearth: Updated, thanks for your help ! Do you see anything else ? |
fn foo(x: u8, ...) {} | ||
``` | ||
|
||
To fix such code, put them in extern "C" block: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"put them in an extern ..."
Also, you misinterpreted my suggestion... there are two ways to fix this error, one is to do:
extern "C" { ... }
and the other is to use extern "C" fn
.
Updated. |
@@ -1535,7 +1556,6 @@ register_diagnostics! { | |||
E0219, // associated type defined in higher-ranked supertrait | |||
E0220, // associated type not found for type parameter | |||
E0221, // ambiguous associated type in bounds | |||
E0222, // variadic function must have C calling convention |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leave this line in, commented out with an indicator that it's been merged with E0045
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes sir !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Still needs some indicator comment saying "merged into E0045" 😄
Done ! |
Oh I almost forgot : #24407. |
@Manishearth: I added the "merged into E0045" |
@bors-servo r+ rollup |
📌 Commit f1a3651 has been approved by |
⌛ Testing commit f1a3651 with merge d0df233... |
@bors r- force
We should comment it out in a way that tidy will not complain on. Perhaps |
@bors force |
⛄ The build was interrupted to prioritize another pull request. |
Updated ! |
@bors r+ rollup |
📌 Commit 3ff1222 has been approved by |
⌛ Testing commit 3ff1222 with merge ec40bc1... |
💔 Test failed - auto-win-gnu-32-nopt-t |
@bors retry |
⌛ Testing commit 3ff1222 with merge d260b1b... |
@bors: retry On Mon, Jun 22, 2015 at 11:23 PM, bors notifications@github.com wrote:
|
⌛ Testing commit 3ff1222 with merge 23edf36... |
💔 Test failed - auto-mac-64-nopt-t |
@bors: retry |
@GuillaumeGomez it looks like this PR was the one that causes a build warning to be generated about previously used diagnostic error codes, could you possible fix this? I know its nit-picky but false warnings drive me nuts. |
Sure, I'll do it this evening. |
r? @Manishearth