Transition to type privacy lints

This commit is contained in:
Jonas Platte 2023-11-09 09:44:01 +01:00
parent c82f600d6a
commit e8bc589e52
No known key found for this signature in database
GPG key ID: AAA7A61F696C3E0C
5 changed files with 18 additions and 6 deletions

View file

@ -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",

View file

@ -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)]

View file

@ -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 {

View file

@ -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,

View file

@ -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"`