diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2020-07-29 09:55:34 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2020-07-29 09:55:34 +0100 |
commit | 04d2b7b256657f8e6816f8ed67aa5608bfe9e261 (patch) | |
tree | 94e442343dc80d12b45defe532f332d36d5e871b /docs/user | |
parent | 82e390ff8687038740b3d3bcfa6c69441ad0be0c (diff) | |
parent | 3600c43f49f9901ffc94a139a8a3655944e91e4e (diff) |
Merge #5565
5565: SSR: Don't mix non-path-based rules with path-based r=matklad a=davidlattimore
If any rules contain paths, then we reject any rules that don't contain paths. Allowing a mix leads to strange semantics, since the path-based rules only match things where the path refers to semantically the same thing, whereas the non-path-based rules could match anything. Specifically, if we have a rule like `foo ==>> bar` we only want to match the `foo` that is in the current scope, not any `foo`. However "foo" can be parsed as a pattern (BIND_PAT -> NAME -> IDENT). Allowing such a rule through would result in renaming everything called `foo` to `bar`. It'd also be slow, since without a path, we'd have to use the slow-scan search mechanism.
Co-authored-by: David Lattimore <[email protected]>
Diffstat (limited to 'docs/user')
0 files changed, 0 insertions, 0 deletions