mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-15 14:18:04 +08:00
Upgrade to the Rust 2024 edition (#2367)
* Update to rust 2024 edition * Fixes * Clean up imports * Cargo fmt again --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
@@ -2,9 +2,9 @@
|
||||
name = "graphite-proc-macros"
|
||||
publish = false
|
||||
version = "0.0.0"
|
||||
rust-version = "1.79"
|
||||
rust-version = "1.85"
|
||||
authors = ["Graphite Authors <contact@graphite.rs>"]
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
readme = "../README.md"
|
||||
homepage = "https://graphite.rs"
|
||||
repository = "https://github.com/GraphiteEditor/Graphite"
|
||||
|
||||
@@ -2,8 +2,8 @@ use crate::helpers::call_site_ident;
|
||||
use proc_macro2::Ident;
|
||||
use proc_macro2::TokenStream;
|
||||
use quote::ToTokens;
|
||||
use syn::parse::{Parse, ParseStream};
|
||||
use syn::Token;
|
||||
use syn::parse::{Parse, ParseStream};
|
||||
use syn::{ItemEnum, TypePath};
|
||||
|
||||
struct MessageArgs {
|
||||
|
||||
@@ -3,7 +3,7 @@ use std::collections::HashMap;
|
||||
use syn::parse::{Parse, ParseStream};
|
||||
use syn::punctuated::Punctuated;
|
||||
use syn::token::Paren;
|
||||
use syn::{parenthesized, LitStr, Token};
|
||||
use syn::{LitStr, Token, parenthesized};
|
||||
|
||||
pub struct IdentList {
|
||||
pub parts: Punctuated<Ident, Token![,]>,
|
||||
|
||||
@@ -45,7 +45,6 @@ pub fn two_segment_path(left_ident: Ident, right_ident: Ident) -> Path {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use quote::ToTokens;
|
||||
use syn::spanned::Spanned;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@ use crate::helper_structs::AttrInnerSingleString;
|
||||
use crate::hint::derive_hint_impl;
|
||||
use crate::transitive_child::derive_transitive_child_impl;
|
||||
use crate::widget_builder::derive_widget_builder_impl;
|
||||
|
||||
use proc_macro::TokenStream;
|
||||
|
||||
/// Derive the `ToDiscriminant` trait and create a `<Type Name>Discriminant` enum
|
||||
@@ -285,7 +284,6 @@ pub fn derive_widget_builder(input_item: TokenStream) -> TokenStream {
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
use proc_macro2::TokenStream as TokenStream2;
|
||||
|
||||
fn ts_assert_eq(l: TokenStream2, r: TokenStream2) {
|
||||
|
||||
Reference in New Issue
Block a user