checkpoint: weird rustc bug permitting extra members

This commit is contained in:
Niko Matsakis 2018-09-29 06:41:00 -04:00
parent d7b1d194de
commit 36e2b9cdcc
5 changed files with 18 additions and 9 deletions

View file

@ -4,7 +4,6 @@ use std::cell::Cell;
#[derive(Default)]
pub struct QueryContextImpl {
runtime: salsa::runtime::Runtime<QueryContextImpl>,
storage: QueryContextImplStorage,
counter: Cell<usize>,
}
@ -26,8 +25,8 @@ impl queries::CounterContext for QueryContextImpl {
}
impl salsa::QueryContext for QueryContextImpl {
fn salsa_storage(&self) -> &QueryContextImplStorage {
&self.storage
fn extra(&self) -> u32 {
0
}
fn salsa_runtime(&self) -> &salsa::runtime::Runtime<QueryContextImpl> {

View file

@ -3,3 +3,5 @@
mod implementation;
mod queries;
mod tests;
fn main() {}

View file

@ -1,3 +1,5 @@
#![cfg(test)]
use crate::implementation::QueryContextImpl;
use crate::queries::QueryContext;