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

Use impl-tools-lib=0.11.0, proc-macro-error2=2.0 #459

Merged
merged 1 commit into from
Dec 9, 2024
Merged
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Merge fns `DrawCx::text_effects` and `text` (#458)
- Remove feature `min_spec` (#458)
- Use `proc-macro-error2` (#459)

## [0.15.0] — 2024-12-02

Expand Down
4 changes: 2 additions & 2 deletions crates/kas-macros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@ recursive-layout-widgets = []
[dependencies]
quote = "1.0"
proc-macro2 = { version = "1.0" }
proc-macro-error = "1.0"
proc-macro-error2 = { version = "2.0", default-features = false }
bitflags = "2.3.3"

[dependencies.impl-tools-lib]
version = "0.10.0" # version used in doc links
version = "0.11.0" # version used in doc links

[dependencies.syn]
version = "2.0.22"
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern crate proc_macro;

use impl_tools_lib::{anon, autoimpl, scope};
use proc_macro::TokenStream;
use proc_macro_error::{emit_call_site_error, proc_macro_error};
use proc_macro_error2::{emit_call_site_error, emit_error, proc_macro_error};
use syn::parse_macro_input;
use syn::spanned::Spanned;

Expand Down Expand Up @@ -394,7 +394,7 @@ pub fn impl_anon(input: TokenStream) -> TokenStream {
// We can't test since Span::eq is unstable!
field.ty.span()
};
proc_macro_error::emit_error!(span, "expected `: TYPE`");
emit_error!(span, "expected `: TYPE`");
}
}
let mut scope = input.into_scope();
Expand Down
4 changes: 2 additions & 2 deletions crates/kas-macros/src/make_layout.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
use crate::collection::{CellInfo, GridDimensions, NameGenerator, StorIdent};
use crate::widget::{self, Child, ChildIdent};
use proc_macro2::{Span, TokenStream as Toks};
use proc_macro_error::emit_error;
use proc_macro_error2::{emit_error, emit_warning};
use quote::{quote, quote_spanned, ToTokens, TokenStreamExt};
use syn::parse::{Parse, ParseStream, Result};
use syn::spanned::Spanned;
Expand Down Expand Up @@ -418,7 +418,7 @@ impl Layout {
let _ = Pack::parse(dot_token, &input2, &mut temp_gen)?;
continue;
} else if let Ok(ident) = input2.parse::<Ident>() {
proc_macro_error::emit_warning!(
emit_warning!(
ident, "this method call is incompatible with feature `recursive-layout-widgets`";
note = "extract operand from layout expression or wrap with braces",
);
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-macros/src/widget.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use impl_tools_lib::fields::{Fields, FieldsNamed, FieldsUnnamed};
use impl_tools_lib::scope::{Scope, ScopeAttr, ScopeItem};
use impl_tools_lib::SimplePath;
use proc_macro2::{Span, TokenStream as Toks};
use proc_macro_error::{emit_error, emit_warning};
use proc_macro_error2::{emit_error, emit_warning};
use quote::{quote, quote_spanned, ToTokens, TokenStreamExt};
use syn::parse::{Error, Parse, ParseStream, Result};
use syn::spanned::Spanned;
Expand Down
2 changes: 1 addition & 1 deletion crates/kas-macros/src/widget_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// https://www.apache.org/licenses/LICENSE-2.0

use proc_macro2::Span;
use proc_macro_error::emit_error;
use proc_macro_error2::emit_error;
use syn::parse::{Parse, ParseStream};
use syn::spanned::Spanned;
use syn::visit_mut::{self, VisitMut};
Expand Down
Loading