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 {
286286#[ derive( Debug ) ]
287287pub struct FrontmatterError {
288288 message : String ,
289- span : Span ,
289+ primary_span : Span ,
290290}
291291
292292impl FrontmatterError {
293293 pub fn new ( message : impl Into < String > , span : Span ) -> Self {
294294 Self {
295295 message : message. into ( ) ,
296- span,
296+ primary_span : span,
297297 }
298298 }
299299
300300 pub fn message ( & self ) -> & str {
301301 self . message . as_str ( )
302302 }
303303
304- pub fn span ( & self ) -> Span {
305- self . span . clone ( )
304+ pub fn primary_span ( & self ) -> Span {
305+ self . primary_span . clone ( )
306306 }
307307}
308308
Original file line number Diff line number Diff line change @@ -2783,7 +2783,7 @@ fn emit_frontmatter_diagnostic(
27832783 manifest_file : & Path ,
27842784 gctx : & GlobalContext ,
27852785) -> anyhow:: Error {
2786- let span = e. span ( ) ;
2786+ let primary_span = e. primary_span ( ) ;
27872787
27882788 // Get the path to the manifest, relative to the cwd
27892789 let manifest_path = diff_paths ( manifest_file, gctx. cwd ( ) )
@@ -2793,7 +2793,7 @@ fn emit_frontmatter_diagnostic(
27932793 let group = Group :: with_title ( Level :: ERROR . primary_title ( e. message ( ) ) ) . element (
27942794 Snippet :: source ( contents)
27952795 . path ( manifest_path)
2796- . annotation ( AnnotationKind :: Primary . span ( span ) ) ,
2796+ . annotation ( AnnotationKind :: Primary . span ( primary_span ) ) ,
27972797 ) ;
27982798
27992799 if let Err ( err) = gctx. shell ( ) . print_report ( & [ group] , true ) {
You can’t perform that action at this time.
0 commit comments