-
Notifications
You must be signed in to change notification settings - Fork 13k
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
E0131 updated to new format #35417
E0131 updated to new format #35417
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jonathandturner (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
"main function is not allowed to have type parameters"); | ||
return; | ||
hir::ItemFn(_, _, _, _, ref generics, _) => { | ||
let gen_span = generics.span(); |
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.
Not sure if i can comment but:
if let Some(gen_span) = generics.span() {
// struct_span_err!..
}
No need for the return
too I think
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.
I didn't add it, it was there originally.
Thanks for the PR! I put a code style comment in, which will help others read the code better. One other thing: please include a unit test that tests for this new label. You can either update the |
Should be good to go, thanks for the patience! |
@Limeth - great, thanks for fixing it. One last thing, can you squash your 7 commits down to 1 commit? |
Cloned a fresh repository, copied over the changes and compiled it again. Took a while, but here it is. I don't know if there is a faster way. |
Phew, yeah, that's probably the hard way. The easier way is to do something like this. I tend to do it after I've done a rebase, so my changes are at the top, I do a Thanks for squashing it. @bors r+ rollup |
📌 Commit 5e06da2 has been approved by |
E0131 updated to new format Changes ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^ ``` to ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^^^ main cannot have type parameters ``` Fixes rust-lang#35257. Part of rust-lang#35233. r? @jonathandturner
E0131 updated to new format Changes ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^ ``` to ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^^^ main cannot have type parameters ``` Fixes rust-lang#35257. Part of rust-lang#35233. r? @jonathandturner
E0131 updated to new format Changes ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^ ``` to ``` error[E0131]: main function is not allowed to have type parameters --> src/test/compile-fail/E0131.rs:11:1 | 11 | fn main<T>() { //~ ERROR E0131 | ^^^ main cannot have type parameters ``` Fixes rust-lang#35257. Part of rust-lang#35233. r? @jonathandturner
Changes
to
Fixes #35257. Part of #35233.
r? @jonathandturner