Skip to content
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

Prevent main from having a where clause. #50782

Merged
merged 1 commit into from
May 19, 2018

Conversation

matthewjasper
Copy link
Contributor

Closes #50714

Should this have a crater run?

cc #48557, #48214

r? @nikomatsakis

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 15, 2018
@varkor
Copy link
Member

varkor commented May 15, 2018

You should add this check for start functions too:

if !ps.params.is_empty() => {
struct_span_err!(tcx.sess, ps.span, E0132,
"start function is not allowed to have type parameters")
.span_label(ps.span,
"start function cannot have type parameters")
.emit();
return;
}

@nikomatsakis
Copy link
Contributor

nikomatsakis commented May 18, 2018

So, this cannot affect libraries, so the potential impact is pretty limited. I suspect we can get by without a crater run.

@nikomatsakis
Copy link
Contributor

r=me once we check start functions as well like @varkor suggested

@bors delegate=matthewjasper

@bors
Copy link
Contributor

bors commented May 18, 2018

✌️ @matthewjasper can now approve this pull request

Erroneous code example:

```compile_fail,E0646
fn start() where i32: Copy { // error: start function is not allowed to have
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your tests look correct, but this isn't a correct example of a start function.

@matthewjasper matthewjasper reopened this May 18, 2018
@matthewjasper
Copy link
Contributor Author

@bors r+

@bors
Copy link
Contributor

bors commented May 18, 2018

📌 Commit 218a81b has been approved by matthewjasper

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 18, 2018
@kennytm
Copy link
Member

kennytm commented May 19, 2018

@bors p=4

@bors
Copy link
Contributor

bors commented May 19, 2018

⌛ Testing commit 218a81b with merge a308575...

bors added a commit that referenced this pull request May 19, 2018
Prevent main from having a where clause.

Closes #50714

Should this have a crater run?

cc #48557, #48214

r? @nikomatsakis
@bors
Copy link
Contributor

bors commented May 19, 2018

☀️ Test successful - status-appveyor, status-travis
Approved by: matthewjasper
Pushing a308575 to master...

@bors bors merged commit 218a81b into rust-lang:master May 19, 2018
@matthewjasper matthewjasper deleted the wheres-main branch May 20, 2018 11:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants