Update tests for future-compat warning removal

This commit is contained in:
Aaron Hill 2019-01-30 17:28:41 -05:00
parent bfcd14dd2b
commit 541d315313
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
2 changed files with 2 additions and 13 deletions

View File

@ -20,7 +20,6 @@ struct PrivateType {
pub struct PublicType {
pub field: OtherType,
//~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
//~| WARNING this was previously accepted
priv_field: OtherType, // Private field - this is fine
pub other_field: PubType // Type from public dependency - this is fine
}
@ -28,7 +27,6 @@ pub struct PublicType {
impl PublicType {
pub fn pub_fn(param: OtherType) {}
//~^ ERROR type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
//~| WARNING this was previously accepted
fn priv_fn(param: OtherType) {}
}
@ -37,7 +35,6 @@ pub trait MyPubTrait {
type Foo: OtherTrait;
}
//~^^^ ERROR trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
//~| WARNING this was previously accepted
pub struct AllowedPrivType {
#[allow(exported_private_dependencies)]

View File

@ -9,28 +9,20 @@ note: lint level defined here
|
LL | #![deny(exported_private_dependencies)]
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
error: type `priv_dep::OtherType` from private dependency 'priv_dep' in public interface
--> $DIR/pub-priv1.rs:29:5
--> $DIR/pub-priv1.rs:28:5
|
LL | pub fn pub_fn(param: OtherType) {}
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
error: trait `priv_dep::OtherTrait` from private dependency 'priv_dep' in public interface
--> $DIR/pub-priv1.rs:36:1
--> $DIR/pub-priv1.rs:34:1
|
LL | / pub trait MyPubTrait {
LL | | type Foo: OtherTrait;
LL | | }
| |_^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #44663 <https://github.com/rust-lang/rust/issues/44663>
error: aborting due to 3 previous errors