diff --git a/example-build/src/main.rs b/example-build/src/main.rs index 349e50cd..817bb0a7 100644 --- a/example-build/src/main.rs +++ b/example-build/src/main.rs @@ -1,4 +1,6 @@ -// Copyright 2022 Oxide Computer Company +// Copyright 2025 Oxide Computer Company + +#![allow(clippy::derivable_impls)] // Include the generated code. include!(concat!(env!("OUT_DIR"), "/codegen.rs")); diff --git a/rust-toolchain.toml b/rust-toolchain.toml index aaba1588..65c0d610 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.85.0" +channel = "1.89.0" profile = "default" diff --git a/typify-impl/src/lib.rs b/typify-impl/src/lib.rs index d4b12545..85ac42f0 100644 --- a/typify-impl/src/lib.rs +++ b/typify-impl/src/lib.rs @@ -794,7 +794,7 @@ impl TypeSpace { } /// Get a type given its ID. - pub fn get_type(&self, type_id: &TypeId) -> Result { + pub fn get_type(&self, type_id: &TypeId) -> Result> { let type_entry = self.id_to_entry.get(type_id).ok_or(Error::InvalidTypeId)?; Ok(Type { type_space: self, @@ -824,7 +824,7 @@ impl TypeSpace { /// Iterate over all types including those defined in this [TypeSpace] and /// those referred to by those types. - pub fn iter_types(&self) -> impl Iterator { + pub fn iter_types(&self) -> impl Iterator> { self.id_to_entry.values().map(move |type_entry| Type { type_space: self, type_entry, @@ -1033,7 +1033,7 @@ impl Type<'_> { } /// Get details about the type. - pub fn details(&self) -> TypeDetails { + pub fn details(&self) -> TypeDetails<'_> { match &self.type_entry.details { // Named user-defined types TypeEntryDetails::Enum(details) => TypeDetails::Enum(TypeEnum { details }), diff --git a/typify-test/src/main.rs b/typify-test/src/main.rs index ad366c98..3ae1bc88 100644 --- a/typify-test/src/main.rs +++ b/typify-test/src/main.rs @@ -1,4 +1,4 @@ -// Copyright 2022 Oxide Computer Company +// Copyright 2025 Oxide Computer Company // Include the generated code to make sure it compiles. include!(concat!(env!("OUT_DIR"), "/codegen.rs")); @@ -57,6 +57,8 @@ fn test_unknown_format() { } mod hashmap { + #![allow(dead_code)] + include!(concat!(env!("OUT_DIR"), "/codegen_hashmap.rs")); #[test] @@ -69,6 +71,8 @@ mod hashmap { } mod custom_map { + #![allow(dead_code)] + #[allow(private_interfaces)] #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub struct CustomMap {