2024-01-14 07:22:43 -06:00
|
|
|
//@ check-pass
|
|
|
|
// test for #119950
|
|
|
|
//@ compile-flags: --crate-type lib
|
|
|
|
|
|
|
|
#![allow(internal_features)]
|
|
|
|
#![feature(allow_internal_unstable)]
|
|
|
|
|
2024-02-09 20:54:28 -06:00
|
|
|
//@ aux-build:specialization-trait.rs
|
|
|
|
extern crate specialization_trait;
|
|
|
|
|
2024-01-14 07:22:43 -06:00
|
|
|
#[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> {}
|
2024-02-09 20:54:28 -06:00
|
|
|
|
|
|
|
impl<U> specialization_trait::SpecTrait for T<U> {
|
|
|
|
fn method(&self) {}
|
|
|
|
}
|
|
|
|
};
|
2024-01-14 07:22:43 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
test! {}
|