]> git.lizzy.rs Git - rust.git/commitdiff
Merge #4900
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>
Mon, 22 Jun 2020 14:37:45 +0000 (14:37 +0000)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2020 14:37:45 +0000 (14:37 +0000)
4900: Self variant enum res fix r=BGluth a=BGluth

Fixes #4789.

This is my first PR for this project, so it's probably worth giving it an extra close look.

A few things that I wasn't sure about:
- Is `resolve_path` really the best place to perform this check? It seemed like a natural place, but perhaps there's a better place?
- When handling the new variant `PathResolution::VariantDef`, I couldn't see an obvious variant of `TypeNs` to return in `in_type_ns` for Unions and Structs.

Co-authored-by: BGluth <gluthb@gmail.com>

Trivial merge