@@ -481,7 +481,7 @@ crate enum DocFragmentKind {
481
481
RawDoc ,
482
482
/// A doc fragment created from a `#[doc(include="filename")]` attribute. Contains both the
483
483
/// given filename and the file contents.
484
- Include { filename : String } ,
484
+ Include { filename : Symbol } ,
485
485
}
486
486
487
487
impl < ' a > FromIterator < & ' a DocFragment > for String {
@@ -565,21 +565,21 @@ impl Attributes {
565
565
/// Reads a `MetaItem` from within an attribute, looks for whether it is a
566
566
/// `#[doc(include="file")]`, and returns the filename and contents of the file as loaded from
567
567
/// its expansion.
568
- crate fn extract_include ( mi : & ast:: MetaItem ) -> Option < ( String , String ) > {
568
+ crate fn extract_include ( mi : & ast:: MetaItem ) -> Option < ( Symbol , String ) > {
569
569
mi. meta_item_list ( ) . and_then ( |list| {
570
570
for meta in list {
571
571
if meta. has_name ( sym:: include) {
572
572
// the actual compiled `#[doc(include="filename")]` gets expanded to
573
573
// `#[doc(include(file="filename", contents="file contents")]` so we need to
574
574
// look for that instead
575
575
return meta. meta_item_list ( ) . and_then ( |list| {
576
- let mut filename: Option < String > = None ;
576
+ let mut filename: Option < Symbol > = None ;
577
577
let mut contents: Option < String > = None ;
578
578
579
579
for it in list {
580
580
if it. has_name ( sym:: file) {
581
581
if let Some ( name) = it. value_str ( ) {
582
- filename = Some ( name. to_string ( ) ) ;
582
+ filename = Some ( name) ;
583
583
}
584
584
} else if it. has_name ( sym:: contents) {
585
585
if let Some ( docs) = it. value_str ( ) {
0 commit comments