-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Associated consts are not object safe. #41494
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
Associated consts are not object safe. #41494
Conversation
added compile-fail test |
fn make_bar<T:Bar>(t: &T) -> &Bar { | ||
//~^ ERROR E0038 | ||
//~| NOTE the trait cannot contain associated consts like `X` | ||
//~| NOTE the trait `Bar` cannot be made into an object |
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.
Unnecessarily indented once to the right.
@bors r+ |
📌 Commit 95ffda1 has been approved by |
…safe, r=arielb1 Associated consts are not object safe. r? @eddyb
💔 Test failed - status-travis |
@bors r+ |
📌 Commit 5dc43d2 has been approved by |
☀️ Test successful - status-appveyor, status-travis |
fixes #26847
r? @eddyb