-
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
Bunch of diagnostics fixes and additions #26963
Conversation
We need to 🚲 a better inline error message for "the trait cannot use Eddy suggested "supertrait |
|
||
E0038: r####" | ||
|
||
Trait objects like `Box<Trait>`, can only be constructed when certain |
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.
Unnecessary comma.
(addressed) |
|
||
``` | ||
|
||
but this won't: |
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'm wondering: should "but" needs a capitalized first letter or not ?
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.
It's part of the same sentence. Starting a sentence with But could be worse :p
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'm not sure how it works in english after ':' so I asked. ^^
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.
yeah it's... strange. English grammar people aren't generally paying attention to putting code blocks into sentences ;)
Modulo all the nits, everything seems good but object safety. |
(addressed) |
Trait objects are a form of dynamic dispatch and use a dynamically sized type | ||
for the inner type. So, for a given trait `Trait`, when `Trait` is treated as a | ||
type, as in `Box<Trait>`, the inner type is "unsized". In such cases the boxed | ||
pointer is a "fat pointer" that contains an extra pointer to a table of methods |
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.
same here
8e78ad9
to
c588935
Compare
@bors r=steveklabnik |
📌 Commit c588935 has been approved by |
⌛ Testing commit c588935 with merge 5dbe99e... |
…abnik I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too. r? @steveklabnik r? @eddyb on the object safety bits cc @michaelsproul Part of rust-lang#24407
⛄ The build was interrupted to prioritize another pull request. |
I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too. r? @steveklabnik r? @eddyb on the object safety bits cc @michaelsproul Part of #24407
I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too.
r? @steveklabnik
r? @eddyb on the object safety bits
cc @michaelsproul
Part of #24407