mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-07-08 05:45:17 +00:00
Changed return_ref
syntax to returns(as_ref)
and returns(cloned)
(#772)
* Changed `return_ref` syntax to `returns(as_ref)` and `returns(cloned)` * Implement * renamed module for return_mode * Rename macro, fix docs, add tests, validate return modes * Cargo fmt --------- Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
d1da99132d
commit
13a2bd7461
54 changed files with 538 additions and 172 deletions
|
@ -67,7 +67,7 @@ fn main() -> Result<()> {
|
|||
#[salsa::input]
|
||||
struct File {
|
||||
path: PathBuf,
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
contents: String,
|
||||
}
|
||||
|
||||
|
@ -158,7 +158,7 @@ impl Diagnostic {
|
|||
#[salsa::tracked]
|
||||
struct ParsedFile<'db> {
|
||||
value: u32,
|
||||
#[return_ref]
|
||||
#[returns(ref)]
|
||||
links: Vec<ParsedFile<'db>>,
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue