]> git.lizzy.rs Git - rust.git/commitdiff
Auto merge of #24056 - nikomatsakis:issue-23853-crates-io, r=aturon
authorbors <bors@rust-lang.org>
Mon, 6 Apr 2015 16:07:18 +0000 (16:07 +0000)
committerbors <bors@rust-lang.org>
Mon, 6 Apr 2015 16:07:18 +0000 (16:07 +0000)
If we find a blanket impl for `Trait` but we're matching on an object `Trait`, prefer the object (I think we could perhaps go either way, but this seems safer). Also give a nice error for attempts to manually `impl Trait for Trait`, since they will be ineffectual.

This fixes the problems around ambiguity ICEs relating to `Any` and `MarkerTrait` that were cropping up all over the place. There may still be similar ICEs reported in #21756 that this PR does not address.

Fixes #24015.

Fixes #24051.
Fixes #24037.
Fixes #23853.
Fixes #21942.
cc #21756.

cc @alexcrichton (this fixes crates.io)
r? @aturon


Trivial merge