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/pub-priv-dep/pub-priv1.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/pub-priv-dep/pub-priv1.rs')
-rw-r--r-- | src/test/ui/privacy/pub-priv-dep/pub-priv1.rs | 44 |
1 files changed, 0 insertions, 44 deletions
diff --git a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs b/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs deleted file mode 100644 index ec8666f93..000000000 --- a/src/test/ui/privacy/pub-priv-dep/pub-priv1.rs +++ /dev/null @@ -1,44 +0,0 @@ -// aux-crate:priv:priv_dep=priv_dep.rs -// aux-build:pub_dep.rs -// compile-flags: -Zunstable-options -#![deny(exported_private_dependencies)] - -// This crate is a private dependency -extern crate priv_dep; -// This crate is a public dependency -extern crate pub_dep; - -use priv_dep::{OtherTrait, OtherType}; -use pub_dep::PubType; - -// Type from private dependency used in private -// type - this is fine -struct PrivateType { - field: OtherType, -} - -pub struct PublicType { - pub field: OtherType, - //~^ ERROR type `OtherType` from private dependency 'priv_dep' in public interface - priv_field: OtherType, // Private field - this is fine - pub other_field: PubType, // Type from public dependency - this is fine -} - -impl PublicType { - pub fn pub_fn(param: OtherType) {} - //~^ ERROR type `OtherType` from private dependency 'priv_dep' in public interface - - fn priv_fn(param: OtherType) {} -} - -pub trait MyPubTrait { - type Foo: OtherTrait; -} -//~^^ ERROR trait `OtherTrait` from private dependency 'priv_dep' in public interface - -pub struct AllowedPrivType { - #[allow(exported_private_dependencies)] - pub allowed: OtherType, -} - -fn main() {} |