diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 215b616b63..e9e1d86b35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,8 @@ on: [push, pull_request] jobs: native: runs-on: ${{ matrix.os }} + env: + RUSTFLAGS: --deny warnings strategy: matrix: os: [ubuntu-latest, windows-latest, macOS-latest] diff --git a/examples/lazy/src/main.rs b/examples/lazy/src/main.rs index 9bf17c563a..0156059842 100644 --- a/examples/lazy/src/main.rs +++ b/examples/lazy/src/main.rs @@ -46,7 +46,7 @@ enum Color { } impl Color { - const ALL: &[Color] = &[ + const ALL: &'static [Color] = &[ Color::Black, Color::Red, Color::Orange, diff --git a/examples/modal/src/main.rs b/examples/modal/src/main.rs index b0e2c81b44..3b69f5e6ed 100644 --- a/examples/modal/src/main.rs +++ b/examples/modal/src/main.rs @@ -205,7 +205,8 @@ enum Plan { } impl Plan { - pub const ALL: &[Self] = &[Self::Basic, Self::Pro, Self::Enterprise]; + pub const ALL: &'static [Self] = + &[Self::Basic, Self::Pro, Self::Enterprise]; } impl fmt::Display for Plan { diff --git a/examples/toast/src/main.rs b/examples/toast/src/main.rs index 20c3dd4274..5b089e8ab0 100644 --- a/examples/toast/src/main.rs +++ b/examples/toast/src/main.rs @@ -210,7 +210,7 @@ mod toast { } impl Status { - pub const ALL: &[Self] = + pub const ALL: &'static [Self] = &[Self::Primary, Self::Secondary, Self::Success, Self::Danger]; } diff --git a/highlighter/src/lib.rs b/highlighter/src/lib.rs index 5630756eed..63f21fc003 100644 --- a/highlighter/src/lib.rs +++ b/highlighter/src/lib.rs @@ -168,7 +168,7 @@ pub enum Theme { } impl Theme { - pub const ALL: &[Self] = &[ + pub const ALL: &'static [Self] = &[ Self::SolarizedDark, Self::Base16Mocha, Self::Base16Ocean,