Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #215 from rust-phf/gha
- Loading branch information
Showing
6 changed files
with
46 additions
and
69 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: CI | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# MSRV and nightly | ||
version: [1.40.0, nightly] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set toolchain | ||
run: | | ||
rustup set profile minimal | ||
rustup override set ${{ matrix.version }} | ||
- name: Run `cargo test` on workspace | ||
run: cargo test --workspace | ||
|
||
- name: phf_macros UI test | ||
if: matrix.version == '1.40.0' | ||
working-directory: phf_macros | ||
run: cargo test --features=unicase_support -- --ignored --test-threads=1 | ||
|
||
- name: phf_codegen test | ||
run: cargo test -p phf_codegen_test | ||
|
||
- name: no_std build check | ||
working-directory: phf | ||
run: cargo build --no-default-features |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
use unicase::UniCase; | ||
use phf::phf_map; | ||
|
||
static MAP: phf::Map<UniCase<&'static str>, isize> = phf_map!( //~ ERROR duplicate key UniCase("FOO") | ||
UniCase::ascii("FOO") => 42, //~ NOTE one occurrence here | ||
UniCase::ascii("foo") => 42, //~ NOTE one occurrence here | ||
static MAP: phf::Map<UniCase<&'static str>, isize> = phf_map!( | ||
UniCase::ascii("FOO") => 42, | ||
UniCase::ascii("foo") => 42, //~ ERROR duplicate key UniCase("FOO") | ||
); | ||
|
||
fn main() {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
error: duplicate key | ||
--> $DIR/equivalent-keys.rs:6:5 | ||
| | ||
6 | UniCase::ascii("foo") => 42, //~ NOTE one occurrence here | ||
6 | UniCase::ascii("foo") => 42, //~ ERROR duplicate key UniCase("FOO") | ||
| ^^^^^^^^^^^^^^^^^^^^^ | ||
| | ||
= note: this error originates in the macro `proc_macro_call` (in Nightly builds, run with -Z macro-backtrace for more info) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters