Files
next.js/.config/ast-grep/rule-tests/__snapshots__/resolved-vc-in-trait-arguments-snapshot.yml
Matt MastracciandGitHub 1bc8f55993 Add Err(anyhow(... ast-grep rule (#90869)
# What

Add an ast-grep rule to use `bail!` rather than `Err(anyhow!(` in a
return position.

# Why

This is slightly more compact, and allows us to port more code over to
turbofmt/turbobail.

Note: _this PR was previously merged into another branch due to a GH
bug_
2026-03-04 09:08:55 -07:00

40 lines
914 B
YAML

id: resolved-vc-in-trait-arguments
snapshots:
? |
#[turbo_tasks::value_trait]
pub trait Example {
fn write_to_disk(self: ResolvedVc<Self>);
}
: fixed: |
#[turbo_tasks::value_trait]
pub trait Example {
fn write_to_disk(self: Vc<Self>);
}
labels:
- source: ResolvedVc<Self>
style: primary
start: 75
end: 91
- source: '#[turbo_tasks::value_trait]'
style: secondary
start: 0
end: 27
- source: |-
pub trait Example {
fn write_to_disk(self: ResolvedVc<Self>);
}
style: secondary
start: 28
end: 95
- source: |-
pub trait Example {
fn write_to_disk(self: ResolvedVc<Self>);
}
style: secondary
start: 28
end: 95
- source: 'fn write_to_disk(self: ResolvedVc<Self>);'
style: secondary
start: 52
end: 93