Skip to content

Fix #11421 #11452

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

Merged
merged 1 commit into from
Jan 10, 2014
Merged

Fix #11421 #11452

merged 1 commit into from
Jan 10, 2014

Conversation

derekchiang
Copy link
Contributor

Closes #11421. A pretty trivial fix.

bors added a commit that referenced this pull request Jan 10, 2014
@bors bors closed this Jan 10, 2014
@bors bors merged commit 6f875c9 into rust-lang:master Jan 10, 2014
flip1995 pushed a commit to flip1995/rust that referenced this pull request Sep 25, 2023
[`len_without_is_empty`]: follow type alias to find inherent `is_empty` method

Fixes rust-lang#11165

When we see an `impl B` and `B` is a type alias to some type `A`, then we need to follow the type alias to look for an `is_empty` method on the aliased type `A`. Before this PR, it'd get the inherent impls of `B`, which there aren't any and so it would warn that there isn't an `is_empty` method even if there was one.
Passing the type alias `DefId` to `TyCtxt::type_of` gives us the aliased `DefId` (or simply return the type itself if it wasn't a type alias) so we can just use that

changelog: [`len_without_is_empty`]: follow type alias to find inherent `is_empty` method
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.

rustdoc --version fails
3 participants