blob: 3ac264e8ebac566251ab8df5a1db51d54f35019d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#![feature(return_position_impl_trait_in_trait)]
#![allow(incomplete_features)]
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
}
|