Skip to content

Commit

Permalink
Reduce MSRV down to 1.53.0
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhenrymantilla committed Jul 8, 2022
1 parent 9143518 commit 287ecd7
Show file tree
Hide file tree
Showing 9 changed files with 165 additions and 173 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ on:
jobs:
# == CHECK == #
check:
name: "Check beta stable and MSRV=1.60.0"
name: "Check beta stable and MSRV=1.53.0"
runs-on: ubuntu-latest
strategy:
matrix:
rust-toolchains:
- 1.60.0
- 1.53.0
- stable
- beta
cargo-locked: ["--locked", ""]
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- macos-latest
- windows-latest
rust-toolchains:
- 1.60.0
- 1.53.0
- stable
steps:
- name: Install Rust toolchain
Expand All @@ -65,17 +65,18 @@ jobs:
- name: Clone repo
uses: actions/checkout@v2

- name: Cargo test
- name: Cargo test (MSRV)
if: matrix.rust-toolchains == '1.53.0'
uses: actions-rs/cargo@v1
with:
command: test

- name: Cargo test (embedded doc tests)
- name: Cargo test (full)
if: matrix.rust-toolchains == 'stable'
uses: actions-rs/cargo@v1
with:
command: test
args: --features docs --doc
args: --features docs,test-lending-iterator-filter

# == UI TESTS ==
ui-test:
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/future-proof.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- macos-latest
- windows-latest
rust-toolchains:
- 1.60.0
- 1.53.0
- stable
- beta
- nightly
Expand All @@ -41,14 +41,16 @@ jobs:
if: matrix.cargo-locked != '--locked'
run: cargo update -v

- name: Cargo test
- name: Cargo test (MSRV)
if: matrix.rust-toolchains == '1.53.0'
uses: actions-rs/cargo@v1
with:
command: test
args: ${{ matrix.cargo-locked }}

- name: Cargo test (embed `README.md` + UI)
if: matrix.rust-toolchains != '1.60.0'
- name: Cargo test (full)
if: matrix.rust-toolchains != '1.53.0'
uses: actions-rs/cargo@v1
with:
command: test-ui
command: test
args: ${{ matrix.cargo-locked }} --features docs,test-lending-iterator-filter
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 8 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,21 @@ debug-macros = [
"nougat-proc_macros/debug-macros"
]

test-lending-iterator-filter = [
"polonius-the-crab",
]

[dependencies]
macro_rules_attribute.version = "0.1.0"
macro_rules_attribute.version = "0.1.2"

polonius-the-crab.version = "0.2.1"
polonius-the-crab.optional = true

[dependencies.nougat-proc_macros]
path = "src/proc_macros"
version = "0.2.0-rc1" # Keep in sync

[dev-dependencies]
polonius-the-crab.version = "0.2.1"

[workspace]
members = [
Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[toolchain]
channel = '1.57.0'
channel = '1.53.0'
# Templated by `cargo-generate` using https://github.com/danielhenrymantilla/proc-macro-template
7 changes: 5 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
//! [`Gat!`]: Gat
//! [#\[gat\]]: gat
#![doc = include_str!("../README.md")]
#![cfg_attr(docs,
cfg_attr(all(), doc = include_str!("../README.md")),
)]
#![doc(html_logo_url = "https://user-images.githubusercontent.com/9920355/170709986-aaa13f92-0faf-4b5d-89c9-6463b6b3d49b.png")]
#![deny(rustdoc::private_intra_doc_links)]

Expand All @@ -13,6 +15,7 @@
/// ## Example(s)
///
/** - ```rust
# use ::core::convert::TryInto;
# fn main() {}
#[macro_use]
extern crate nougat;
Expand Down Expand Up @@ -218,6 +221,6 @@ pub use ::nougat_proc_macros::Gat;
pub use ::macro_rules_attribute::apply;

#[cfg_attr(feature = "ui-tests",
doc = include_str!("compile_fail_tests.md"),
cfg_attr(all(), doc = include_str!("compile_fail_tests.md")),
)]
mod _compile_fail_tests {}
2 changes: 1 addition & 1 deletion src/proc_macros/gat-attr/_mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ impl visit_mut::VisitMut
if type_path.path.segments.first().unwrap().ident == "Self"
&& matches!(
type_path.path.segments.last().unwrap().arguments,
| PathArguments::AngleBracketed { .. }
PathArguments::AngleBracketed { .. }
)
{
let Self_;
Expand Down
2 changes: 1 addition & 1 deletion src/proc_macros/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ fn combine_trait_name_and_assoc_type (
) -> Ident
{
Ident::new(
&format!("{}__{}", trait_name, assoc_type),
&format!("{}{}", trait_name, assoc_type),
assoc_type.span(), // .located_at(trait_name.span()),
)
}
Loading

0 comments on commit 287ecd7

Please sign in to comment.