-
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
dropck: Ignore bounds for traits without any items #24805
Comments
6 tasks
(In particular, I discovered this while doing some prototyping work on stabilizing allocators by adding a |
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
Apr 28, 2015
Fix rust-lang#24805 (see follow-on commit for test.)
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
Apr 28, 2015
The new functionality being tested here is that a drop impl bounded by `UserDefined` does not cause dropck to inject its conservative constraints on region inference.
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
May 5, 2015
Fix rust-lang#24805 (see follow-on commit for test.)
pnkfelix
added a commit
to pnkfelix/rust
that referenced
this issue
May 5, 2015
The new functionality being tested here is that a drop impl bounded by `UserDefined` does not cause dropck to inject its conservative constraints on region inference.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As stated in RFC 769, the Drop Check rule is supposed to ignore any trait bounds for traits that do not have associated methods (or perhaps that needs to be strengthened to associated items, as implied by this ticket's title).
However, the current dropck implementation is not so general -- I believe it just hard-codes the set of builtin bounds, rather than allowing any empty trait to be ignored.
This is bad because it complicates e.g. adding OIBIT traits to interfaces, since it can cause the
dropck
rule to start firing (and for new region constraints to be introduced) that can then cause surprising compilation failures.The text was updated successfully, but these errors were encountered: