File tree 2 files changed +2
-13
lines changed
src/test/ui/privacy/pub-priv-dep
2 files changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -20,15 +20,13 @@ struct PrivateType {
20
20
pub struct PublicType {
21
21
pub field : OtherType ,
22
22
//~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
23
- //~| WARNING this was previously accepted
24
23
priv_field : OtherType , // Private field - this is fine
25
24
pub other_field : PubType // Type from public dependency - this is fine
26
25
}
27
26
28
27
impl PublicType {
29
28
pub fn pub_fn ( param : OtherType ) { }
30
29
//~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
31
- //~| WARNING this was previously accepted
32
30
33
31
fn priv_fn ( param : OtherType ) { }
34
32
}
@@ -37,7 +35,6 @@ pub trait MyPubTrait {
37
35
type Foo : OtherTrait ;
38
36
}
39
37
//~^^^ ERROR trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
40
- //~| WARNING this was previously accepted
41
38
42
39
pub struct AllowedPrivType {
43
40
#[ allow( exported_private_dependencies) ]
Original file line number Diff line number Diff line change @@ -9,28 +9,20 @@ note: lint level defined here
9
9
|
10
10
LL | #![deny(exported_private_dependencies)]
11
11
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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>
14
12
15
13
error: 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
17
15
|
18
16
LL | pub fn pub_fn(param: OtherType) {}
19
17
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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>
23
18
24
19
error: 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
26
21
|
27
22
LL | / pub trait MyPubTrait {
28
23
LL | | type Foo: OtherTrait;
29
24
LL | | }
30
25
| |_^
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>
34
26
35
27
error: aborting due to 3 previous errors
36
28
You can’t perform that action at this time.
0 commit comments