Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Rust stable #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ on:
jobs:
ci:
runs-on: ubuntu-20.04
strategy:
matrix:
rust:
- stable
- nightly-2023-11-01

steps:
- uses: actions/checkout@v3

Expand Down
15 changes: 15 additions & 0 deletions macros/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use std::{env, ffi::OsString, process::Command};

fn main() {
let rustc = env::var_os("RUSTC").unwrap_or_else(|| OsString::from("rustc"));

let output = Command::new(rustc)
.arg("--version")
.output()
.expect("failed to run `rustc --version`");

if String::from_utf8_lossy(&output.stdout).contains("nightly") {
println!("cargo:rustc-cfg=nightly");
}
println!("cargo:rerun-if-changed=build.rs");
}
2 changes: 1 addition & 1 deletion macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#![allow(incomplete_features)]
#![feature(proc_macro_diagnostic)]
#![cfg_attr(nightly, feature(proc_macro_diagnostic))]

extern crate proc_macro;
mod actor;
Expand Down