Sign in
android
/
toolchain
/
rustc
/
refs/heads/main
/
.
/
tests
/
ui
/
impl-trait
/
in-trait
/
opaque-in-impl-is-opaque.rs
blob: 1f18bb3b774be9b9a732d05ee88ae1590f62a6a5 [
file
] [
log
] [
blame
] [
edit
]
use
std
::
fmt
::
Display
;
trait
Foo
{
fn
bar
(&
self
)
->
impl
Display
;
}
impl
Foo
for
()
{
fn
bar
(&
self
)
->
impl
Display
{
"Hello, world"
}
}
fn
main
()
{
let
x
:
&
str
=
().
bar
();
//~^ ERROR mismatched types
}