Handle ambiguous projections
This commit is contained in:
parent
b528cc90bc
commit
f95d9deafd
2 changed files with 21 additions and 4 deletions
17
tests/ui/crashes/ice-rust-107877.rs
Normal file
17
tests/ui/crashes/ice-rust-107877.rs
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#![allow(dead_code)]
|
||||
|
||||
struct Foo;
|
||||
|
||||
impl<'a> std::convert::TryFrom<&'a String> for Foo {
|
||||
type Error = std::convert::Infallible;
|
||||
|
||||
fn try_from(_: &'a String) -> Result<Self, Self::Error> {
|
||||
Ok(Foo)
|
||||
}
|
||||
}
|
||||
|
||||
fn find<E>(_: impl std::convert::TryInto<Foo, Error = E>) {}
|
||||
|
||||
fn main() {
|
||||
find(&String::new());
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue