about summary refs log tree commit diff
path: root/tests/ui/specialization/min_specialization/allow_internal_unstable.rs
blob: efc509c5eac0ad4384d938ae785336b87620c230 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
//@ check-pass
// test for #119950
//@ compile-flags: --crate-type lib

#![allow(internal_features)]
#![feature(allow_internal_unstable)]

//@ aux-build:specialization-trait.rs
extern crate specialization_trait;

#[allow_internal_unstable(min_specialization)]
macro_rules! test {
    () => {
        struct T<U>(U);
        trait Tr {}
        impl<U> Tr for T<U> {}
        impl Tr for T<u8> {}

        impl<U> specialization_trait::SpecTrait for T<U> {
            fn method(&self) {}
        }
    };
}

test! {}