Commit graph

24 commits

Author SHA1 Message Date
Niko Matsakis
344166617c update tests for new error messages
also fix name of a fn in one case
2024-05-24 07:16:50 -04:00
Niko Matsakis
44a8a2f41c make fn input/value a GAT 2024-05-24 07:16:50 -04:00
Niko Matsakis
b050bd874a remove Key from Fn configuration
Just use salsa::Id for the most part.
2024-05-24 07:16:50 -04:00
Niko Matsakis
5d6f883b18 improve spans for inputs 2024-04-04 06:24:07 -04:00
Niko Matsakis
e2f6437890 add tests that show improved spans 2024-04-04 06:21:33 -04:00
Niko Matsakis
54b33c335a create tracked field-ingredients 2024-04-02 06:08:55 -04:00
Yoshitomo Nakanishi
d0ca81e58f Update macro test fixtures to reflect rustc diagnostics updates 2023-10-08 21:47:01 +02:00
Yoshitomo Nakanishi
cbafc307fc Fix trybuild ui test to adapt the change of rustc error message 2023-04-22 11:16:51 +02:00
DropDemBits
ee762e8bdf
Update trybuild tests
Rust 1.68 changed how the help suggestion text renders, showing a diff
for the suggested change.
2023-03-15 10:37:08 -04:00
XFFXFF
51f1f0c36d update compile fail tests for latest stable rustc 2022-11-29 12:36:12 +08:00
XFFXFF
98d1be0650 mark the outputs as valid as we encounter them in deep_verify_memo 2022-09-24 23:59:25 +00:00
armoha
9fc958bb1d update compile-fail test .stderr message 2022-09-24 14:40:02 +09:00
OLUWAMUYIWA
0f21bf0fd8 made singleton struct panic upon duplication and added tests to immutable fields 2022-09-16 14:53:56 +01:00
Onigbinde Oluwamuyiwa Elijah
fac05b3c9f
Merge branch 'salsa-rs:master' into singleton 2022-09-11 09:12:17 +01:00
OLUWAMUYIWA
7f691e3907 fixed difference in .stderr files 2022-09-07 22:19:05 +01:00
OLUWAMUYIWA
08449c61b4 eshaustive tests to check salsa macros using the trybuild tool 2022-09-07 20:09:33 +01:00
bors[bot]
e0d07812fa
Merge #392
392: Allow creation of tracked methods r=nikomatsakis a=Skepfyr

Fixes #319.

This allows users to annotate impl blocks with `#[salsa::tracked]` and
then create tracked methods by marking individual functions with
`#[salsa::tracked]`.

Note this requires your code that looks like:
```rust
#[salsa::tracked(jar = Jar)]
impl MyInput {
    #[salsa::tracked]
    fn tracked_fn(self, db: &dyn Db) -> u32 {
        self.field(db) * 2
    }
}
```
You get an error if you annotate a method with `#[salsa::tracked]` but forget to mark the impl block.

It got messier than I was hoping but I think it turned out alright, this would look really pretty if we had [inherent associated types](https://github.com/rust-lang/rust/issues/8995), but we don't. Annoyingly even if that landed I think we'd still need the attribute on the impl block just so that it was possible to create the associated struct somewhere as you can't put types inside an impl block (and they aren't accessible if placed inside a function).

Co-authored-by: Jack Rickard <jack.rickard@outlook.com>
2022-09-05 10:44:51 +00:00
Jack Rickard
bac4c668cf
Add more tests for tracked methods 2022-09-03 15:44:56 +01:00
Onigbinde Oluwamuyiwa Elijah
aa25761bd4
Merge branch 'salsa-rs:master' into singleton 2022-09-03 14:37:27 +01:00
OLUWAMUYIWA
25809151dd removed AllowedMode trait and added compile-fail tests 2022-09-02 13:09:28 +01:00
Mihail Mihov
0a3b74da57 Add compile-fail test for getter and setter visibility 2022-09-02 03:19:21 +03:00
XFFXFF
f7519acb13 add a test for specify
`specify` does not work if the key is a `salsa::interned`
2022-08-27 07:51:35 +08:00
XFFXFF
82a6251ebc add a test for specify
`specify` does not work if the key is a `salsa::input`
2022-08-27 07:05:35 +08:00
XFFXFF
738dc3f878 test for compile failure: lru can not be used with specify 2022-08-19 07:13:03 +08:00