File tree Expand file tree Collapse file tree 2 files changed +2
-13
lines changed
src/test/ui/privacy/pub-priv-dep Expand file tree Collapse file tree 2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,13 @@ struct PrivateType {
2020pub struct PublicType {
2121 pub field : OtherType ,
2222 //~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
23- //~| WARNING this was previously accepted
2423 priv_field : OtherType , // Private field - this is fine
2524 pub other_field : PubType // Type from public dependency - this is fine
2625}
2726
2827impl PublicType {
2928 pub fn pub_fn ( param : OtherType ) { }
3029 //~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
31- //~| WARNING this was previously accepted
3230
3331 fn priv_fn ( param : OtherType ) { }
3432}
@@ -37,7 +35,6 @@ pub trait MyPubTrait {
3735 type Foo : OtherTrait ;
3836}
3937//~^^^ ERROR trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
40- //~| WARNING this was previously accepted
4138
4239pub struct AllowedPrivType {
4340 #[ allow( exported_private_dependencies) ]
Original file line number Diff line number Diff line change @@ -9,28 +9,20 @@ note: lint level defined here
99 |
1010LL | #![deny(exported_private_dependencies)]
1111 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
12- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
13- = note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
1412
1513error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
16- --> $DIR/pub-priv1.rs:29 :5
14+ --> $DIR/pub-priv1.rs:28 :5
1715 |
1816LL | pub fn pub_fn(param: OtherType) {}
1917 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
20- |
21- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
22- = note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
2318
2419error: trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
25- --> $DIR/pub-priv1.rs:36 :1
20+ --> $DIR/pub-priv1.rs:34 :1
2621 |
2722LL | / pub trait MyPubTrait {
2823LL | | type Foo: OtherTrait;
2924LL | | }
3025 | |_^
31- |
32- = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
33- = note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
3426
3527error: aborting due to 3 previous errors
3628
You can’t perform that action at this time.
0 commit comments