Auto merge of #60721 - estebank:ice-ice-baby, r=varkor

Avoid ICE by using delay_span_bug

Fix #59406, fix #53498.
This commit is contained in:
bors 2019-05-11 03:56:11 +00:00
commit 7519eaca9a
3 changed files with 29 additions and 2 deletions

View file

@ -0,0 +1,17 @@
pub mod test {
pub struct A;
pub struct B;
pub struct Foo<T>(T);
impl Foo<A> {
fn foo() {}
}
impl Foo<B> {
fn foo() {}
}
}
fn main() {
test::Foo::<test::B>::foo(); //~ ERROR method `foo` is private
}

View file

@ -0,0 +1,9 @@
error[E0624]: method `foo` is private
--> $DIR/issue-53498.rs:16:5
|
LL | test::Foo::<test::B>::foo();
| ^^^^^^^^^^^^^^^^^^^^^^^^^
error: aborting due to previous error
For more information about this error, try `rustc --explain E0624`.