make the compile-fail test work

This commit is contained in:
Niko Matsakis 2019-01-17 05:21:34 -05:00
parent 0f577a2b10
commit 8affc724c9
2 changed files with 8 additions and 4 deletions

View file

@ -22,3 +22,5 @@ salsa_macros = { version = "0.9", path = "components/salsa_macros" }
diff = "0.1.0"
env_logger = "0.5.13"
rand = "0.5.5"
[workspace]

View file

@ -34,13 +34,13 @@ use syn::{parse_macro_input, AttributeArgs, FnArg, Ident, ItemTrait, ReturnType,
/// ```ignore
/// #[salsa::query_group]
/// trait TypeckDatabase {
/// #[salsa::XXX] // see below for legal attributes
/// #[salsa::input] // see below for other legal attributes
/// fn my_query(&self, input: u32) -> u64;
///
/// /// Queries can have any number of inputs (including zero); if there
/// /// is not exactly one input, then the key type will be
/// /// a tuple of the input types, so in this case `(u32, f32)`.
/// fn other_query(input1: u32, input2: f32) -> u64;
/// fn other_query(&self, input1: u32, input2: f32) -> u64;
/// }
/// ```
///
@ -100,7 +100,8 @@ use syn::{parse_macro_input, AttributeArgs, FnArg, Ident, ItemTrait, ReturnType,
/// Some attributes are mutually exclusive. For example, it is an error to add
/// multiple storage specifiers:
///
/// ```ignore
/// ```compile_fail
/// # use salsa_macros as salsa;
/// #[salsa::query_group]
/// trait CodegenDatabase {
/// #[salsa::input]
@ -111,7 +112,8 @@ use syn::{parse_macro_input, AttributeArgs, FnArg, Ident, ItemTrait, ReturnType,
///
/// It is also an error to annotate a function to `invoke` on an `input` query:
///
/// ```compile-fail
/// ```compile_fail
/// # use salsa_macros as salsa;
/// #[salsa::query_group]
/// trait CodegenDatabase {
/// #[salsa::input]