breaking: sync with latest proc_macro function signatures on nightly. Shall break with nightly before 2025-04-(~28).
This commit is contained in:
parent
ed7cb25e91
commit
7f068ba283
2 changed files with 10 additions and 3 deletions
|
|
@ -1,6 +1,8 @@
|
||||||
#![doc = include_str!("../README.md")]
|
#![doc = include_str!("../README.md")]
|
||||||
#![cfg_attr(feature = "nightly", feature(proc_macro_span))]
|
#![cfg_attr(feature = "nightly", feature(proc_macro_span))]
|
||||||
|
|
||||||
|
use std::str::FromStr;
|
||||||
|
|
||||||
use cfg_if::cfg_if;
|
use cfg_if::cfg_if;
|
||||||
use proc_macro::TokenStream;
|
use proc_macro::TokenStream;
|
||||||
use sabry_procmacro_impl::impls::{
|
use sabry_procmacro_impl::impls::{
|
||||||
|
|
@ -39,7 +41,10 @@ pub fn scssy(input: TokenStream) -> TokenStream {
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(feature = "nightly")] {
|
if #[cfg(feature = "nightly")] {
|
||||||
use proc_macro::Span;
|
use proc_macro::Span;
|
||||||
let source_path = Span::call_site().source_file().path().parent().map(|p| p.to_owned());
|
use std::path::PathBuf;
|
||||||
|
let source_path = Some(PathBuf::from_str(
|
||||||
|
&Span::call_site().file()).expect("&str to be Infallible converted into PathBuf")
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
let source_path = None;
|
let source_path = None;
|
||||||
}
|
}
|
||||||
|
|
@ -109,7 +114,10 @@ pub fn styly(input: TokenStream) -> TokenStream {
|
||||||
cfg_if! {
|
cfg_if! {
|
||||||
if #[cfg(feature = "nightly")] {
|
if #[cfg(feature = "nightly")] {
|
||||||
use proc_macro::Span;
|
use proc_macro::Span;
|
||||||
let source_path = Span::call_site().source_file().path().parent().map(|p| p.to_owned());
|
use std::path::PathBuf;
|
||||||
|
let source_path = Some(PathBuf::from_str(
|
||||||
|
&Span::call_site().file()).expect("&str to be Infallible converted into PathBuf")
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
let source_path = None;
|
let source_path = None;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ license.workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
sabry_intrnl = { workspace = true }
|
sabry_intrnl = { workspace = true }
|
||||||
|
|
||||||
syn = { version = "^2", features = ["parsing"] }
|
syn = { version = "^2", features = ["parsing"] }
|
||||||
quote = { version = "^1" }
|
quote = { version = "^1" }
|
||||||
proc-macro2 = { version = "^1", features = ["span-locations"] }
|
proc-macro2 = { version = "^1", features = ["span-locations"] }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue