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

impl Buffer for ChanReader #17998

Merged
merged 1 commit into from
Oct 17, 2014
Merged

impl Buffer for ChanReader #17998

merged 1 commit into from
Oct 17, 2014

Conversation

rapha
Copy link
Contributor

@rapha rapha commented Oct 13, 2014

No description provided.

@alexcrichton
Copy link
Member

Thanks! Could you add some tests to exercise the buffered behavior as well?

@rapha
Copy link
Contributor Author

rapha commented Oct 15, 2014

Done

@alexcrichton
Copy link
Member

Awesome, thanks! Could you squash the commits together as well? Other than that I think this is good to go!

@rapha
Copy link
Contributor Author

rapha commented Oct 16, 2014

Done

@bors bors closed this Oct 17, 2014
@bors bors merged commit 7081007 into rust-lang:master Oct 17, 2014
lnicola pushed a commit to lnicola/rust that referenced this pull request Sep 25, 2024
fix: `std::error::Error` is object unsafe

Fixes rust-lang#17998

I tried to get generic predicates of assoc function itself, not inherited from the parent here;

https://github.com/rust-lang/rust-analyzer/blob/0ae42bd42576566540a84c62e118aa823edcf2ec/crates/hir-ty/src/object_safety.rs#L420-L442

But this naive equality check approach doesn't work when the assoc function has one or more generic paramters like;

```rust
trait Foo {}
trait Bar: Foo {
    fn bar(&self);
}
```

because the generic predicates of the parent, `Bar` is `[^1.0 implements Foo]` and the generic predicates of `fn bar` is `[^1.1 implements Foo]`, which are different.

This PR implements a correct logic for filtering out parent generic predicates for this.
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.

3 participants