You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Cannot import impls from diamond-shaped libraries #2242
It seems that libraries re-export the ifaces/impls of libraries they're using, which triggers a duplicate symbol error when libraries are used in a diamond shaped pattern.
This is no longer a duplicate symbol error, but has progressed to being a type error. The problem is that resolve adds an extra _impl into the iscopes list for b's re-export of to_str. I think this is a resolve bug: resolve shouldn't add an _impl twice in two different scopes for an impl with the same def_id. I was able to fix it by making typeck::check::method::lookup::add_candidates_from_scope remove duplicate entries from the iscopes -- but that was a terrible performance regression, and anyway, resolve shouldn't add the same def_id twice.
I checked in the test case as src/test/run-pass/issue-2242-d.rs. Reassigning to @pcwalton , who can hopefully make sure the resolve rewrite doesn't reproduce this bug :-)
Activity
Test for #2242 (xfailed for now)
catamorphism commentedon Jun 20, 2012
This is no longer a duplicate symbol error, but has progressed to being a type error. The problem is that resolve adds an extra _impl into the iscopes list for b's re-export of
to_str. I think this is a resolve bug: resolve shouldn't add an _impl twice in two different scopes for an impl with the same def_id. I was able to fix it by makingtypeck::check::method::lookup::add_candidates_from_scoperemove duplicate entries from the iscopes -- but that was a terrible performance regression, and anyway, resolve shouldn't add the same def_id twice.I checked in the test case as
src/test/run-pass/issue-2242-d.rs. Reassigning to @pcwalton , who can hopefully make sure the resolve rewrite doesn't reproduce this bug :-)test: Modernize and un-XFAIL issue-2242-d.rs (issue #2242)
pcwalton commentedon Aug 7, 2012
Some combination of resolve3 and coherence fixed this. Un-XFAILed in 793c0a1.
Auto merge of rust-lang#2242 - dtolnay-contrib:rustfmtskip, r=RalfJung
Merge pull request rust-lang#2242 from DuskyElf/master
Fix parsing of "postfix" range expressions.
Merge rust-lang#2252