public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc/devel/rust/master] libproc_macro: Add LexError type interface
@ 2023-04-06 21:29 Thomas Schwinge
  0 siblings, 0 replies; only message in thread
From: Thomas Schwinge @ 2023-04-06 21:29 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:4f6d36157d123e6960f4256243480e5d53b7ba72

commit 4f6d36157d123e6960f4256243480e5d53b7ba72
Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Date:   Fri Feb 10 14:48:22 2023 +0100

    libproc_macro: Add LexError type interface
    
    Add LexError type rust interface in libproc_macro.
    
    ChangeLog:
    
            * librust/proc_macro/rust/lib.rs: Add LexError.
    
    Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>

Diff:
---
 librust/proc_macro/rust/lib.rs | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/librust/proc_macro/rust/lib.rs b/librust/proc_macro/rust/lib.rs
index 83d84489634..c28ffebb550 100644
--- a/librust/proc_macro/rust/lib.rs
+++ b/librust/proc_macro/rust/lib.rs
@@ -1,3 +1,4 @@
+use std::error;
 use std::fmt;
 
 #[derive(Copy, Clone, Debug, PartialEq, Eq)]
@@ -92,3 +93,14 @@ impl fmt::Debug for Ident {
         todo!("Implement this function")
     }
 }
+
+#[derive(Debug)]
+pub struct LexError;
+
+impl fmt::Display for LexError {
+    fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
+        todo!("Implement this function")
+    }
+}
+
+impl error::Error for LexError {}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-04-06 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-06 21:29 [gcc/devel/rust/master] libproc_macro: Add LexError type interface Thomas Schwinge

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).