-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
178 additions
and
194 deletions.
There are no files selected for viewing
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,60 @@ | ||
name: Rust | ||
|
||
on: [push, pull_request] | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
check: | ||
name: "Tests" | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
channel: | ||
- stable | ||
- beta | ||
- nightly | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
|
||
- name: Install Rust Toolchain | ||
run: rustup default ${{ matrix.channel }} | ||
|
||
- name: Install cargo-hack | ||
run: cargo install cargo-hack | ||
|
||
- name: Powerset | ||
run: cargo hack test --feature-powerset --lib | ||
|
||
miri: | ||
name: "Miri" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install Miri | ||
run: | | ||
rustup toolchain install nightly --component miri | ||
cargo +nightly miri setup | ||
- name: Default features | ||
run: cargo +nightly miri test | ||
|
||
embedded: | ||
name: Build (embedded) | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab | ||
|
||
- name: Install Rust toolchain | ||
run: | | ||
rustup default nightly | ||
rustup target add thumbv7em-none-eabi | ||
- name: Default features | ||
run: cargo build -Z avoid-dev-deps --features spin_no_std --target thumbv7em-none-eabi |
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 |
---|---|---|
|
@@ -2,3 +2,4 @@ target | |
doc | ||
Cargo.lock | ||
.cargo | ||
wip |
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
compiletest/tests/compile-fail/incorrect_visibility_restriction.rs
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,8 @@ | ||
#[macro_use] | ||
extern crate lazy_static; | ||
|
||
lazy_static! { | ||
pub(nonsense) static ref WRONG: () = (); | ||
} | ||
|
||
fn main() { } |
10 changes: 10 additions & 0 deletions
10
tests/compile_fail/incorrect_visibility_restriction.stderr
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,10 @@ | ||
error[E0704]: incorrect visibility restriction | ||
--> tests/compile_fail/incorrect_visibility_restriction.rs:5:9 | ||
| | ||
5 | pub(nonsense) static ref WRONG: () = (); | ||
| ^^^^^^^^ help: make this visible only to module `nonsense` with `in`: `in nonsense` | ||
| | ||
= help: some possible visibility restrictions are: | ||
`pub(crate)`: visible only on the current crate | ||
`pub(super)`: visible only in the current module's parent | ||
`pub(in path::to::module)`: visible only on the specified path |
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,14 @@ | ||
error[E0603]: static `FOO` is private | ||
--> tests/compile_fail/static_is_private.rs:13:31 | ||
| | ||
13 | assert_eq!(*outer::inner::FOO, ()); | ||
| ^^^ private static | ||
| | ||
note: the static `FOO` is defined here | ||
--> tests/compile_fail/static_is_private.rs:6:9 | ||
| | ||
6 | / lazy_static! { | ||
7 | | pub(in outer) static ref FOO: () = (); | ||
8 | | } | ||
| |_________^ | ||
= note: this error originates in the macro `lazy_static` (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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#[macro_use] | ||
extern crate lazy_static; | ||
|
||
lazy_static! { | ||
pub static ref FOO: str = panic!(); | ||
} | ||
|
||
|
||
fn main() { } |
Oops, something went wrong.