Skip to content
  1. Apr 19, 2021
  2. Apr 18, 2021
  3. Apr 17, 2021
  4. Apr 16, 2021
  5. Apr 15, 2021
  6. Apr 14, 2021
    • Jim Blandy's avatar
      Avoid non-exhaustive matches on Expression. · 6701e2bf
      Jim Blandy authored
      Non-exhaustive matches on `Expression` make it harder to review changes that add
      new enum variants, because the compiler can't tell you that you've missed a
      case.
      
      Although I believe Clippy is able to do so, I don't think we should make a
      blanket rule of forbidding wildcard match arms against `Expression`. There are a
      few matches that are only concerned with a handful of variants, or a single
      variant. For example, variant, naga::front::spv::Parser::next_block is only
      concerned with whether an expression is a constant or not. In principle, these
      sites should also be checked when adding a new variant, but it seems too
      burdensome to require them to list all the `Expression` variants they don't care
      about. The principle should be applied only to matches that are already handling
      most variants.
      
      At the moment, there is only one such match on `Expression` in the code base,
      and it's only missing a few variants, so this is quick to fix.
      6701e2bf
    • Dzmitry Malyshau's avatar
      Remove cargo-insta · c2c93e4e
      Dzmitry Malyshau authored
      c2c93e4e
    • Jim Blandy's avatar
      Makefile: Be more flexible in removing YAML headers from snapshots. · f7fdf6b5
      Jim Blandy authored
      The snapshot files in tests/out start with headers like this:
      
          ---
          source: tests/snapshots.rs
          expression: dis
          ---
          ; SPIR-V
          ; Version: 1.0
          ; Generator: rspirv
          ...
      
      The Makefile's `validate-foo` targets trim off those lines with `tail -n +5`
      before submitting their test to the validators.
      
      However, some versions of the `insta` crate seem to generate headers with an
      extra blank line, like this:
      
          ---
          source: tests/snapshots.rs
          expression: dis
      
          ---
      
      This makes the `validate-foo` targets unhappy.
      
      This commit changes the `validate-foo` targets to use `sed` to cope with both
      kinds of headers.
      f7fdf6b5
  7. Apr 13, 2021
  8. Apr 12, 2021
  9. Apr 11, 2021
  10. Apr 10, 2021
  11. Apr 09, 2021