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:
Dennis Kobert
2025-03-13 01:29:12 +01:00
committed by GitHub
parent 927d7dd9b2
commit beb1c6ae64
253 changed files with 980 additions and 1371 deletions

View File

@@ -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"

View File

@@ -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 {

View File

@@ -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![,]>,

View File

@@ -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;

View File

@@ -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) {