mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
# 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_
43 lines
881 B
YAML
43 lines
881 B
YAML
id: no-context
|
|
snapshots:
|
|
'fn foo(context: ChunkingContext) -> u32 { 5 };':
|
|
labels:
|
|
- source: context
|
|
style: primary
|
|
start: 7
|
|
end: 14
|
|
- source: 'context: ChunkingContext'
|
|
style: secondary
|
|
start: 7
|
|
end: 31
|
|
foo(|context| context):
|
|
labels:
|
|
- source: context
|
|
style: primary
|
|
start: 5
|
|
end: 12
|
|
- source: '|context|'
|
|
style: secondary
|
|
start: 4
|
|
end: 13
|
|
let context = ChunkingContext::new();:
|
|
labels:
|
|
- source: context
|
|
style: primary
|
|
start: 4
|
|
end: 11
|
|
- source: let context = ChunkingContext::new();
|
|
style: secondary
|
|
start: 0
|
|
end: 37
|
|
'struct Foo { context: Context };':
|
|
labels:
|
|
- source: context
|
|
style: primary
|
|
start: 13
|
|
end: 20
|
|
- source: 'context: Context'
|
|
style: secondary
|
|
start: 13
|
|
end: 29
|