diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/privacy/associated-item-privacy-type-binding.rs | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/privacy/associated-item-privacy-type-binding.rs')
-rw-r--r-- | src/test/ui/privacy/associated-item-privacy-type-binding.rs | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/src/test/ui/privacy/associated-item-privacy-type-binding.rs b/src/test/ui/privacy/associated-item-privacy-type-binding.rs deleted file mode 100644 index 9826b83a3..000000000 --- a/src/test/ui/privacy/associated-item-privacy-type-binding.rs +++ /dev/null @@ -1,64 +0,0 @@ -#![feature(decl_macro, associated_type_defaults)] -#![allow(unused, private_in_public)] - -mod priv_trait { - trait PrivTr { - type AssocTy = u8; - } - pub trait PubTr: PrivTr {} - - pub macro mac1() { - let _: Box<dyn PubTr<AssocTy = u8>>; - //~^ ERROR trait `PrivTr` is private - //~| ERROR trait `PrivTr` is private - type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>; - //~^ ERROR trait `PrivTr` is private - trait InSignatureTr2: PubTr<AssocTy = u8> {} - //~^ ERROR trait `PrivTr` is private - } - pub macro mac2() { - let _: Box<dyn PrivTr<AssocTy = u8>>; - //~^ ERROR trait `PrivTr` is private - //~| ERROR trait `PrivTr` is private - type InSignatureTy1 = Box<dyn PrivTr<AssocTy = u8>>; - //~^ ERROR trait `PrivTr` is private - trait InSignatureTr1: PrivTr<AssocTy = u8> {} - //~^ ERROR trait `PrivTr` is private - } -} -fn priv_trait1() { - priv_trait::mac1!(); -} -fn priv_trait2() { - priv_trait::mac2!(); -} - -mod priv_parent_substs { - pub trait PubTrWithParam<T = Priv> { - type AssocTy = u8; - } - struct Priv; - pub trait PubTr: PubTrWithParam<Priv> {} - - pub macro mac() { - let _: Box<dyn PubTrWithParam<AssocTy = u8>>; - //~^ ERROR type `Priv` is private - //~| ERROR type `Priv` is private - let _: Box<dyn PubTr<AssocTy = u8>>; - //~^ ERROR type `Priv` is private - //~| ERROR type `Priv` is private - pub type InSignatureTy1 = Box<dyn PubTrWithParam<AssocTy = u8>>; - //~^ ERROR type `Priv` is private - pub type InSignatureTy2 = Box<dyn PubTr<AssocTy = u8>>; - //~^ ERROR type `Priv` is private - trait InSignatureTr1: PubTrWithParam<AssocTy = u8> {} - //~^ ERROR type `Priv` is private - trait InSignatureTr2: PubTr<AssocTy = u8> {} - //~^ ERROR type `Priv` is private - } -} -fn priv_parent_substs() { - priv_parent_substs::mac!(); -} - -fn main() {} |