Sign in
◑
Theme
rust
/
rust
/
573bd7d4ada3677648942e644f0894de7d22ac14
/
.
/
tests
/
ui
/
dyn-compatibility
/
sized-2.rs
blob: c99dcce46b2c168e1931b9aa9244e684d5125d19 [
file
]
// Check that we correctly prevent users from making trait objects
// from traits where `Self : Sized`.
trait
Bar
where
Self
:
Sized
{
fn
bar
<
T
>(&
self
,
t
:
T
);
}
fn
make_bar
<
T
:
Bar
>(
t
:
&
T
)
->
&
dyn
Bar
{
//~^ ERROR E0038
t
}
fn
main
()
{
}