Skip to content

Commit 59dd96c

Browse files
move diagnostic to new crate proc_macro2_diagnostic (#31)
1 parent 3625249 commit 59dd96c

3 files changed

Lines changed: 6 additions & 155 deletions

File tree

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "try_v2"
3-
version = "0.3.3"
3+
version = "0.3.4"
44
edition = "2024"
55
readme = "README.md"
66
description = "Provides a derive macro for `Try` ([try_trait_v2](https://rust-lang.github.io/rfcs/3058-try-trait-v2.html))"
@@ -19,6 +19,7 @@ proc-macro = true
1919
[dependencies]
2020
syn = {version = "2.0.117", features = ["full","extra-traits"]}
2121
proc-macro2 = "1.0.106"
22+
proc_macro2_diagnostic = "0.0.1"
2223
quote = "1.0.45"
2324

2425
[dev-dependencies]

src/diagnostic.rs

Lines changed: 0 additions & 146 deletions
This file was deleted.

src/lib.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
#![feature(if_let_guard)]
33
#![feature(let_chains)]
44
#![feature(never_type)]
5-
#![feature(proc_macro_diagnostic)]
65
#![feature(try_trait_v2)]
76

87
//! Provides a derive macro for `Try`
@@ -74,20 +73,17 @@
7473
7574
use proc_macro::TokenStream as TokenStream1;
7675
use proc_macro2::TokenStream as TokenStream2;
76+
use proc_macro2_diagnostic::{
77+
DiagnosticResult::{self, Ok},
78+
DiagnosticStream,
79+
};
7780
use quote::{format_ident, quote};
7881
use syn::{
7982
AngleBracketedGenericArguments, Arm, Data, DataEnum, DeriveInput, Fields, GenericArgument,
8083
GenericParam, Ident, Lifetime, PathArguments, Type, TypePath, TypeReference, Variant,
8184
parse_quote, spanned::Spanned,
8285
};
8386

84-
mod diagnostic;
85-
86-
use diagnostic::{
87-
DiagnosticResult::{self, Ok},
88-
DiagnosticStream,
89-
};
90-
9187
#[proc_macro_derive(Try)]
9288
/// Derives [try_trait_v2](https://rust-lang.github.io/rfcs/3058-try-trait-v2.html)
9389
///

0 commit comments

Comments
 (0)