diff --git a/ash/Cargo.toml b/ash/Cargo.toml index 0e2bb56..2d2fec2 100644 --- a/ash/Cargo.toml +++ b/ash/Cargo.toml @@ -8,6 +8,7 @@ repository = "https://github.com/MaikKlein/ash" readme = "../README.md" keywords = ["vulkan", "graphic"] documentation = "https://docs.rs/ash" +edition = "2018" [dependencies] shared_library = "0.1.9" diff --git a/ash/src/device.rs b/ash/src/device.rs index 5684678..3f4be48 100644 --- a/ash/src/device.rs +++ b/ash/src/device.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::mem; use std::os::raw::c_void; use std::ptr; -use vk; -use RawPtr; +use crate::vk; +use crate::RawPtr; #[allow(non_camel_case_types)] pub trait DeviceV1_1: DeviceV1_0 { diff --git a/ash/src/entry.rs b/ash/src/entry.rs index ca6cef3..3f4c4c8 100644 --- a/ash/src/entry.rs +++ b/ash/src/entry.rs @@ -1,5 +1,5 @@ -use instance::Instance; -use prelude::*; +use crate::instance::Instance; +use crate::prelude::*; use shared_library::dynamic_library::DynamicLibrary; use std::error::Error; use std::fmt; @@ -9,8 +9,8 @@ use std::os::raw::c_void; use std::path::Path; use std::ptr; use std::sync::Arc; -use vk; -use RawPtr; +use crate::vk; +use crate::RawPtr; #[cfg(windows)] const LIB_PATH: &'static str = "vulkan-1.dll"; diff --git a/ash/src/extensions/experimental/amd.rs b/ash/src/extensions/experimental/amd.rs index a68f057..c43bcb4 100644 --- a/ash/src/extensions/experimental/amd.rs +++ b/ash/src/extensions/experimental/amd.rs @@ -25,7 +25,7 @@ use std::fmt; use std::os::raw::*; -use vk::*; +use crate::vk::*; // Extension: `VK_AMD_gpa_interface` diff --git a/ash/src/extensions/ext/debug_marker.rs b/ash/src/extensions/ext/debug_marker.rs index 11f6ce6..2a25493 100644 --- a/ash/src/extensions/ext/debug_marker.rs +++ b/ash/src/extensions/ext/debug_marker.rs @@ -1,9 +1,9 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{DeviceV1_0, InstanceV1_0}; -use vk; +use crate::version::{DeviceV1_0, InstanceV1_0}; +use crate::vk; #[derive(Clone)] pub struct DebugMarker { diff --git a/ash/src/extensions/ext/debug_report.rs b/ash/src/extensions/ext/debug_report.rs index 1d50117..7a52e31 100644 --- a/ash/src/extensions/ext/debug_report.rs +++ b/ash/src/extensions/ext/debug_report.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct DebugReport { diff --git a/ash/src/extensions/ext/debug_utils.rs b/ash/src/extensions/ext/debug_utils.rs index a8acffd..72af416 100644 --- a/ash/src/extensions/ext/debug_utils.rs +++ b/ash/src/extensions/ext/debug_utils.rs @@ -1,9 +1,9 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use {vk, RawPtr}; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::{vk, RawPtr}; #[derive(Clone)] pub struct DebugUtils { diff --git a/ash/src/extensions/khr/android_surface.rs b/ash/src/extensions/khr/android_surface.rs index d9d343d..b16e2d3 100644 --- a/ash/src/extensions/khr/android_surface.rs +++ b/ash/src/extensions/khr/android_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct AndroidSurface { diff --git a/ash/src/extensions/khr/display_swapchain.rs b/ash/src/extensions/khr/display_swapchain.rs index 29c3b5d..fd5f99d 100644 --- a/ash/src/extensions/khr/display_swapchain.rs +++ b/ash/src/extensions/khr/display_swapchain.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{DeviceV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{DeviceV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct DisplaySwapchain { diff --git a/ash/src/extensions/khr/surface.rs b/ash/src/extensions/khr/surface.rs index 03e4867..12c4f39 100644 --- a/ash/src/extensions/khr/surface.rs +++ b/ash/src/extensions/khr/surface.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; use std::ptr; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct Surface { diff --git a/ash/src/extensions/khr/swapchain.rs b/ash/src/extensions/khr/swapchain.rs index ade5d04..32785ad 100644 --- a/ash/src/extensions/khr/swapchain.rs +++ b/ash/src/extensions/khr/swapchain.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; use std::ptr; -use version::{DeviceV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{DeviceV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct Swapchain { diff --git a/ash/src/extensions/khr/wayland_surface.rs b/ash/src/extensions/khr/wayland_surface.rs index ec5480d..658ef0e 100644 --- a/ash/src/extensions/khr/wayland_surface.rs +++ b/ash/src/extensions/khr/wayland_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct WaylandSurface { diff --git a/ash/src/extensions/khr/win32_surface.rs b/ash/src/extensions/khr/win32_surface.rs index 72ae7ef..d19b266 100644 --- a/ash/src/extensions/khr/win32_surface.rs +++ b/ash/src/extensions/khr/win32_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct Win32Surface { diff --git a/ash/src/extensions/khr/xcb_surface.rs b/ash/src/extensions/khr/xcb_surface.rs index dbd05e8..55e0931 100644 --- a/ash/src/extensions/khr/xcb_surface.rs +++ b/ash/src/extensions/khr/xcb_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct XcbSurface { diff --git a/ash/src/extensions/khr/xlib_surface.rs b/ash/src/extensions/khr/xlib_surface.rs index aed6ca4..9d579fa 100644 --- a/ash/src/extensions/khr/xlib_surface.rs +++ b/ash/src/extensions/khr/xlib_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct XlibSurface { diff --git a/ash/src/extensions/mvk/ios_surface.rs b/ash/src/extensions/mvk/ios_surface.rs index 4aac1c5..e7364d0 100644 --- a/ash/src/extensions/mvk/ios_surface.rs +++ b/ash/src/extensions/mvk/ios_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct IOSSurface { diff --git a/ash/src/extensions/mvk/macos_surface.rs b/ash/src/extensions/mvk/macos_surface.rs index 9dbf44b..5a33a48 100644 --- a/ash/src/extensions/mvk/macos_surface.rs +++ b/ash/src/extensions/mvk/macos_surface.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{EntryV1_0, InstanceV1_0}; -use vk; -use RawPtr; +use crate::version::{EntryV1_0, InstanceV1_0}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct MacOSSurface { diff --git a/ash/src/extensions/nv/mesh_shader.rs b/ash/src/extensions/nv/mesh_shader.rs index c982951..c2fe3c7 100644 --- a/ash/src/extensions/nv/mesh_shader.rs +++ b/ash/src/extensions/nv/mesh_shader.rs @@ -1,8 +1,8 @@ #![allow(dead_code)] use std::ffi::CStr; use std::mem; -use version::{DeviceV1_0, InstanceV1_0}; -use vk; +use crate::version::{DeviceV1_0, InstanceV1_0}; +use crate::vk; #[derive(Clone)] pub struct MeshShader { diff --git a/ash/src/extensions/nv/ray_tracing.rs b/ash/src/extensions/nv/ray_tracing.rs index 02aa71f..6d52dbf 100644 --- a/ash/src/extensions/nv/ray_tracing.rs +++ b/ash/src/extensions/nv/ray_tracing.rs @@ -1,10 +1,10 @@ #![allow(dead_code)] -use prelude::*; +use crate::prelude::*; use std::ffi::CStr; use std::mem; -use version::{DeviceV1_0, InstanceV1_0, InstanceV1_1}; -use vk; -use RawPtr; +use crate::version::{DeviceV1_0, InstanceV1_0, InstanceV1_1}; +use crate::vk; +use crate::RawPtr; #[derive(Clone)] pub struct RayTracing { diff --git a/ash/src/instance.rs b/ash/src/instance.rs index 4db5ceb..252ea86 100644 --- a/ash/src/instance.rs +++ b/ash/src/instance.rs @@ -1,11 +1,11 @@ #![allow(dead_code)] -use device::Device; -use prelude::*; +use crate::device::Device; +use crate::prelude::*; use std::mem; use std::os::raw::c_char; use std::ptr; -use vk; -use RawPtr; +use crate::vk; +use crate::RawPtr; #[doc = ""] #[derive(Clone)] diff --git a/ash/src/lib.rs b/ash/src/lib.rs index d6e5fc2..3641b93 100644 --- a/ash/src/lib.rs +++ b/ash/src/lib.rs @@ -25,9 +25,9 @@ extern crate shared_library; -pub use device::Device; -pub use entry::{Entry, EntryCustom, InstanceError, LoadingError}; -pub use instance::Instance; +pub use crate::device::Device; +pub use crate::entry::{Entry, EntryCustom, InstanceError, LoadingError}; +pub use crate::instance::Instance; mod device; mod entry; diff --git a/ash/src/prelude.rs b/ash/src/prelude.rs index a01406c..b4a888c 100644 --- a/ash/src/prelude.rs +++ b/ash/src/prelude.rs @@ -1,2 +1,2 @@ -use vk; +use crate::vk; pub type VkResult = Result; diff --git a/ash/src/util.rs b/ash/src/util.rs index 178da36..e616bac 100644 --- a/ash/src/util.rs +++ b/ash/src/util.rs @@ -3,7 +3,7 @@ use std::marker::PhantomData; use std::mem::size_of; use std::os::raw::c_void; use std::{io, slice}; -use vk; +use crate::vk; /// `Align` handles dynamic alignment. The is useful for dynamic uniform buffers where /// the alignment might be different. For example a 4x4 f32 matrix has a size of 64 bytes diff --git a/ash/src/version.rs b/ash/src/version.rs index 922f6bf..e6121a8 100644 --- a/ash/src/version.rs +++ b/ash/src/version.rs @@ -1,3 +1,3 @@ -pub use device::{DeviceV1_0, DeviceV1_1}; -pub use entry::{EntryV1_0, EntryV1_1}; -pub use instance::{InstanceV1_0, InstanceV1_1}; +pub use crate::device::{DeviceV1_0, DeviceV1_1}; +pub use crate::entry::{EntryV1_0, EntryV1_1}; +pub use crate::instance::{InstanceV1_0, InstanceV1_1}; diff --git a/ash/src/vk.rs b/ash/src/vk.rs index bcd41b8..4ca01a1 100644 --- a/ash/src/vk.rs +++ b/ash/src/vk.rs @@ -18,7 +18,7 @@ pub(crate) unsafe fn ptr_chain_iter(ptr: &mut T) -> impl Iterator u64; - fn from_raw(u64) -> Self; + fn from_raw(_: u64) -> Self; } #[doc = ""] #[macro_export] diff --git a/generator/Cargo.toml b/generator/Cargo.toml index 12ffbd5..215d66b 100644 --- a/generator/Cargo.toml +++ b/generator/Cargo.toml @@ -2,6 +2,7 @@ name = "generator" version = "0.1.0" authors = ["Maik Klein "] +edition = "2018" [dependencies] vk-parse = "0.2" diff --git a/generator/src/lib.rs b/generator/src/lib.rs index a63ca4a..6050659 100644 --- a/generator/src/lib.rs +++ b/generator/src/lib.rs @@ -1432,7 +1432,7 @@ pub fn derive_setters( _ => None, }); - let (has_next, is_next_const) = match members + let (has_next, _is_next_const) = match members .clone() .find(|field| field.param_ident().to_string() == "p_next") { @@ -2275,7 +2275,7 @@ pub fn write_source_code(path: &Path) { pub trait Handle { const TYPE: ObjectType; fn as_raw(self) -> u64; - fn from_raw(u64) -> Self; + fn from_raw(_: u64) -> Self; } #version_macros