Skip to content

Conversation

@sophiajt
Copy link
Contributor

This addresses #35343, #35923, and #35924. Part of #35233

Specifically, this adds labels to these error messages following the suggestions in the attached bugs.

r? @nrc

@nrc
Copy link
Member

nrc commented Sep 26, 2016

@bors: r+

@bors
Copy link
Collaborator

bors commented Sep 26, 2016

📌 Commit 2fa91b2 has been approved by nrc

span_err!(self.tcx.sess, ty.span, E0446,
let mut err = struct_span_err!(self.tcx.sess, ty.span, E0446,
"private type in public interface");
err.span_label(ty.span, &format!("private type can't be public"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Pretty strange tautological wording for the label.
Something like "can't leak private type" or "private type can't escape" maybe?
Or at least "private type can't become public"?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@petrochenkov - yeah, those could also work. That reminds me that we need to start putting together a Rust error styleguide for future errors as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

I like @petrochenkov 's suggestion of "can't leak private type"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The two votes have it :) I'll update

@sophiajt
Copy link
Contributor Author

@bors r=nrc

@bors
Copy link
Collaborator

bors commented Sep 27, 2016

📌 Commit c0f29fd has been approved by nrc

@bors
Copy link
Collaborator

bors commented Sep 27, 2016

⌛ Testing commit c0f29fd with merge ea65ab6...

bors added a commit that referenced this pull request Sep 27, 2016
Update E0425, E0446, E0449

This addresses #35343, #35923, and #35924.  Part of #35233

Specifically, this adds labels to these error messages following the suggestions in the attached bugs.

r? @nrc
@bors bors merged commit c0f29fd into rust-lang:master Sep 27, 2016
@bors bors mentioned this pull request Sep 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants