File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,17 @@ impl<'a> Snippet<'a> {
152152 }
153153}
154154
155+ /// An annotation for a [`Snippet`].
156+ ///
157+ /// This gets created by [`Label::span`].
158+ #[ derive( Debug ) ]
159+ pub struct Annotation < ' a > {
160+ /// The byte range of the annotation in the `source` string
161+ pub ( crate ) range : Range < usize > ,
162+ pub ( crate ) label : & ' a str ,
163+ pub ( crate ) level : Level ,
164+ }
165+
155166/// Types of annotations.
156167#[ derive( Debug , Clone , Copy , PartialEq ) ]
157168pub enum Level {
@@ -163,14 +174,3 @@ pub enum Level {
163174 Note ,
164175 Help ,
165176}
166-
167- /// An annotation for a [`Snippet`].
168- ///
169- /// This gets created by [`Label::span`].
170- #[ derive( Debug ) ]
171- pub struct Annotation < ' a > {
172- /// The byte range of the annotation in the `source` string
173- pub ( crate ) range : Range < usize > ,
174- pub ( crate ) label : & ' a str ,
175- pub ( crate ) level : Level ,
176- }
You can’t perform that action at this time.
0 commit comments