Bug: chained where T: trait multiple applicable items #140892
Labels
C-bug
Category: This is a bug.
needs-triage
This issue may need triage. Remove it if it has been sufficiently triaged.
I expected that
all_languages()
filters type byBuilder<impl RealHasher>
, and so there would be only one candidate ofbuild()
, because hasher of the first one does not implementRealHasher
(becauseDummyBuildHasher
does not implementDefault
), so it would compile.Instead, it ignores that
all_languages()
limits hasher type with traitRealHasher
, and thinks that there are two candidates ofbuild()
.Ideas
I still don't understand why it enables the second candidate of
build()
, but does not disable the first one. Because withoutall_languages()
there is only one candidate. Maybe it correctly adds the traitRealHasher
, but forgets to remove the first candidate ofbuild()
from a list of all possible candidates?Also given that
.all_languages::<std::hash::RandomState>().build()
works, but not.all_languages().build::<std::hash::RandomState>()
, maybe there is a problem with type determination (passing) in chained calls?Meta
rustc --version --verbose
:Backtrace
The text was updated successfully, but these errors were encountered: