Sign in
chromium
/
external
/
github.com
/
rust-lang
/
rust
/
HEAD
/
.
/
tests
/
ui
/
traits
/
negative-impls
/
negative-specializes-positive-item.rs
blob: da22e43377f52a1ec51e17a4402726a14f8f7f2f [
file
]
#![
feature
(
specialization
)]
#![
feature
(
negative_impls
)]
// Negative impl for u32 cannot "specialize" the base impl.
trait
MyTrait
{
fn
foo
();
}
impl
<
T
>
MyTrait
for
T
{
default
fn
foo
()
{}
}
impl
!
MyTrait
for
u32
{}
//~ ERROR E0751
fn
main
()
{}