File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -286,23 +286,23 @@ fn is_whitespace(c: char) -> bool {
286
286
#[ derive( Debug ) ]
287
287
pub struct FrontmatterError {
288
288
message : String ,
289
- span : Span ,
289
+ primary_span : Span ,
290
290
}
291
291
292
292
impl FrontmatterError {
293
293
pub fn new ( message : impl Into < String > , span : Span ) -> Self {
294
294
Self {
295
295
message : message. into ( ) ,
296
- span,
296
+ primary_span : span,
297
297
}
298
298
}
299
299
300
300
pub fn message ( & self ) -> & str {
301
301
self . message . as_str ( )
302
302
}
303
303
304
- pub fn span ( & self ) -> Span {
305
- self . span . clone ( )
304
+ pub fn primary_span ( & self ) -> Span {
305
+ self . primary_span . clone ( )
306
306
}
307
307
}
308
308
Original file line number Diff line number Diff line change @@ -2783,7 +2783,7 @@ fn emit_frontmatter_diagnostic(
2783
2783
manifest_file : & Path ,
2784
2784
gctx : & GlobalContext ,
2785
2785
) -> anyhow:: Error {
2786
- let span = e. span ( ) ;
2786
+ let primary_span = e. primary_span ( ) ;
2787
2787
2788
2788
// Get the path to the manifest, relative to the cwd
2789
2789
let manifest_path = diff_paths ( manifest_file, gctx. cwd ( ) )
@@ -2793,7 +2793,7 @@ fn emit_frontmatter_diagnostic(
2793
2793
let group = Group :: with_title ( Level :: ERROR . primary_title ( e. message ( ) ) ) . element (
2794
2794
Snippet :: source ( contents)
2795
2795
. path ( manifest_path)
2796
- . annotation ( AnnotationKind :: Primary . span ( span ) ) ,
2796
+ . annotation ( AnnotationKind :: Primary . span ( primary_span ) ) ,
2797
2797
) ;
2798
2798
2799
2799
if let Err ( err) = gctx. shell ( ) . print_report ( & [ group] , true ) {
You can’t perform that action at this time.
0 commit comments