Skip to content
This repository was archived by the owner on May 28, 2022. It is now read-only.

Commit 6359752

Browse files
committed
Update for latest nightly Rust
Tested with: rustc 1.31.0-nightly (8c4ad4e9e 2018-10-04) The changes are mainly about the Rust 2018 transition: - Stopped using `await` as an identifier since it's been reserved as a placeholder for a potential keyword and causes a hard error (rust-lang/rust#54411). - Removed redundant lifetime bounds.
1 parent 76202c8 commit 6359752

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

EngineCore/src/ngsgamegfx/src/di.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ impl DeviceContainer for Container {
3939
}
4040
}
4141

42-
pub fn new_device_container(device: gfx::DeviceRef, cmd_queue_set: CmdQueueSet) -> Container {
42+
pub(crate) fn new_device_container(device: gfx::DeviceRef, cmd_queue_set: CmdQueueSet) -> Container {
4343
let mut container = Container::new();
4444

4545
// TODO: register default factories

EngineCore/src/zangfx/src/backend/vulkan/src/cmd/monitor.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,12 +158,12 @@ impl<T> Drop for Monitor<T> {
158158

159159
/// This type is used to set up a fence to be waited by `Monitor` and then
160160
/// to have its associated callback called when the fence is signaled.
161-
pub(super) struct MonitorFence<'a, T: 'a> {
161+
pub(super) struct MonitorFence<'a, T> {
162162
monitor: Option<&'a Monitor<T>>,
163163
fence: vk::Fence,
164164
}
165165

166-
impl<'a, T: 'a> MonitorFence<'a, T> {
166+
impl<'a, T> MonitorFence<'a, T> {
167167
crate fn vk_fence(&self) -> vk::Fence {
168168
self.fence
169169
}
@@ -183,7 +183,7 @@ impl<'a, T: 'a> MonitorFence<'a, T> {
183183
}
184184
}
185185

186-
impl<'a, T: 'a> Drop for MonitorFence<'a, T> {
186+
impl<'a, T> Drop for MonitorFence<'a, T> {
187187
fn drop(&mut self) {
188188
if let Some(monitor) = self.monitor.take() {
189189
monitor.fence_sender.send(self.fence).unwrap();

EngineCore/src/zangfx/src/backend/vulkan/src/resstate.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,14 +181,14 @@ impl<State> TrackedState<State> {
181181
}
182182

183183
#[derive(Debug)]
184-
crate struct RefTableEntry<'a, Res: 'a, Op: 'a> {
184+
crate struct RefTableEntry<'a, Res, Op> {
185185
crate index: usize,
186186
crate resource: &'a Res,
187187
crate op: &'a Op,
188188
}
189189

190190
#[derive(Debug)]
191-
crate struct RefTableEntryMut<'a, Res: 'a, Op: 'a> {
191+
crate struct RefTableEntryMut<'a, Res, Op> {
192192
crate index: usize,
193193
crate resource: &'a Res,
194194
crate op: &'a mut Op,

EngineCore/src/zangfx/src/test/src/backend_benches/cmdbuffer.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ fn cb_throughput<T: BenchDriver>(driver: T, b: &mut impl Bencher, num_cbs: usize
3030
for i in 0..10 {
3131
let cb_idx = i % cb_ring.len();
3232
{
33-
let await = &mut cb_ring[cb_idx];
34-
await();
33+
let wait_completion = &mut cb_ring[cb_idx];
34+
wait_completion();
3535
}
3636

3737
let mut awaiters: Vec<_> = (0..num_cbs)
@@ -60,8 +60,8 @@ fn cb_throughput<T: BenchDriver>(driver: T, b: &mut impl Bencher, num_cbs: usize
6060
});
6161
});
6262

63-
for mut await in cb_ring.drain(..) {
64-
await();
63+
for mut wait_completion in cb_ring.drain(..) {
64+
wait_completion();
6565
}
6666
});
6767
}

0 commit comments

Comments
 (0)