Transition to type privacy lints
This commit is contained in:
parent
c82f600d6a
commit
e8bc589e52
5 changed files with 18 additions and 6 deletions
|
@ -6,7 +6,6 @@ crates-io = "https://docs.rs/"
|
|||
|
||||
[target.'cfg(all())']
|
||||
rustflags = [
|
||||
"-Wprivate_in_public",
|
||||
"-Wrust_2018_idioms",
|
||||
"-Wsemicolon_in_expressions_from_macros",
|
||||
"-Wunreachable_pub",
|
||||
|
|
|
@ -237,6 +237,7 @@ impl PartialEq<RoomVersionId> for String {
|
|||
|
||||
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
|
||||
#[doc(hidden)]
|
||||
#[allow(unknown_lints, unnameable_types)]
|
||||
pub struct CustomRoomVersion(Box<str>);
|
||||
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -110,6 +110,7 @@ impl Serialize for Action {
|
|||
|
||||
/// An unknown action.
|
||||
#[doc(hidden)]
|
||||
#[allow(unknown_lints, unnameable_types)]
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
#[serde(untagged)]
|
||||
pub enum CustomAction {
|
||||
|
|
|
@ -41,7 +41,9 @@ mod video;
|
|||
mod without_relation;
|
||||
|
||||
#[cfg(feature = "unstable-msc3245-v1-compat")]
|
||||
pub use self::audio::{UnstableAudioDetailsContentBlock, UnstableVoiceContentBlock};
|
||||
pub use self::audio::{
|
||||
UnstableAmplitude, UnstableAudioDetailsContentBlock, UnstableVoiceContentBlock,
|
||||
};
|
||||
pub use self::{
|
||||
audio::{AudioInfo, AudioMessageEventContent},
|
||||
emote::EmoteMessageEventContent,
|
||||
|
|
|
@ -226,10 +226,19 @@ impl CiTask {
|
|||
///
|
||||
/// Also checks that all features that are used in the code exist.
|
||||
fn nightly_all(&self) -> Result<()> {
|
||||
cmd!("rustup run {NIGHTLY} cargo check --workspace --all-features -Z unstable-options -Z check-cfg")
|
||||
.env("RUSTFLAGS", "-D warnings")
|
||||
.run()
|
||||
.map_err(Into::into)
|
||||
cmd!(
|
||||
"
|
||||
rustup run {NIGHTLY} cargo check
|
||||
--workspace --all-features -Z unstable-options -Z check-cfg
|
||||
"
|
||||
)
|
||||
.env(
|
||||
"RUSTFLAGS",
|
||||
"-Z crate-attr=feature(type_privacy_lints) \
|
||||
-D private_bounds,private_interfaces,unnameable_types,warnings",
|
||||
)
|
||||
.run()
|
||||
.map_err(Into::into)
|
||||
}
|
||||
|
||||
/// Check ruma-common with `ruma_identifiers_storage="Box"`
|
||||
|
|
Loading…
Reference in a new issue