@@ -481,7 +481,7 @@ crate enum DocFragmentKind {
481481 RawDoc ,
482482 /// A doc fragment created from a `#[doc(include="filename")]` attribute. Contains both the
483483 /// given filename and the file contents.
484- Include { filename : String } ,
484+ Include { filename : Symbol } ,
485485}
486486
487487impl < ' a > FromIterator < & ' a DocFragment > for String {
@@ -565,21 +565,21 @@ impl Attributes {
565565 /// Reads a `MetaItem` from within an attribute, looks for whether it is a
566566 /// `#[doc(include="file")]`, and returns the filename and contents of the file as loaded from
567567 /// its expansion.
568- crate fn extract_include ( mi : & ast:: MetaItem ) -> Option < ( String , String ) > {
568+ crate fn extract_include ( mi : & ast:: MetaItem ) -> Option < ( Symbol , String ) > {
569569 mi. meta_item_list ( ) . and_then ( |list| {
570570 for meta in list {
571571 if meta. has_name ( sym:: include) {
572572 // the actual compiled `#[doc(include="filename")]` gets expanded to
573573 // `#[doc(include(file="filename", contents="file contents")]` so we need to
574574 // look for that instead
575575 return meta. meta_item_list ( ) . and_then ( |list| {
576- let mut filename: Option < String > = None ;
576+ let mut filename: Option < Symbol > = None ;
577577 let mut contents: Option < String > = None ;
578578
579579 for it in list {
580580 if it. has_name ( sym:: file) {
581581 if let Some ( name) = it. value_str ( ) {
582- filename = Some ( name. to_string ( ) ) ;
582+ filename = Some ( name) ;
583583 }
584584 } else if it. has_name ( sym:: contents) {
585585 if let Some ( docs) = it. value_str ( ) {
0 commit comments