Use Ancestory to check default fn in const impl instead of comparing idents#89471
Use Ancestory to check default fn in const impl instead of comparing idents#89471bors merged 2 commits intorust-lang:masterfrom
Conversation
|
r? @cjgillot (rust-highfive has picked a reviewer for you, use r? to override) |
|
Using Symbols completely ignores macro hygiene. In which extent can it be ignored? How does rustc_typeck check impls are complete? |
bdb99dd to
7d4d536
Compare
|
I was under the impression that method names are not hygenic, but then I realized it not be true for macro 2.0. So a proper comparision would involve calling |
There was a problem hiding this comment.
Can you separate this into another ui test? Having passing code and failing code in the same file does not seem like a good idea to me.
There was a problem hiding this comment.
There is an impl const Tr for u8 above already, which is a passing test. Should I split that out as well?
There was a problem hiding this comment.
Yes. I don't know why I included that in the failing test at the time...
|
r? @fee1-dead |
|
@bors r+ |
|
📌 Commit 0a03f8c has been approved by |
Use Ancestory to check default fn in const impl instead of comparing idents Fixes https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Const.20trait.20impl.20inside.20macro
…askrgr Rollup of 9 pull requests Successful merges: - rust-lang#89471 (Use Ancestory to check default fn in const impl instead of comparing idents) - rust-lang#89643 (Fix inherent impl overlap check.) - rust-lang#89651 (Add `Poll::ready` and revert stabilization of `task::ready!`) - rust-lang#89675 (Re-use TypeChecker instead of passing around some of its fields ) - rust-lang#89710 (Add long explanation for error E0482) - rust-lang#89756 (Greatly reduce amount of debuginfo compiled for bootstrap itself) - rust-lang#89760 (Remove hack ignoring unused attributes for stage 0 std) - rust-lang#89772 (Fix function-names test for GDB 10.1) - rust-lang#89785 (Fix ICE when compiling nightly std/rustc on beta compiler) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Fixes https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/topic/Const.20trait.20impl.20inside.20macro