File tree Expand file tree Collapse file tree 2 files changed +3
-6
lines changed
compiler/rustc_error_codes/src/error_codes Expand file tree Collapse file tree 2 files changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,7 @@ Cannot use `doc(inline)` with anonymous imports
22
33Erroneous code example:
44
5- ``` compile_fail,E0780,edition2018
6- extern crate foo;
5+ ``` ignore (cannot-doctest-multicrate-project)
76
87#[doc(inline)] // error: invalid doc argument
98pub use foo::Foo as _;
@@ -15,7 +14,6 @@ error, remove the `#[doc(inline)]` attribute.
1514Example:
1615
1716``` ignore (cannot-doctest-multicrate-project)
18- extern crate foo;
1917
2018pub use foo::Foo as _;
2119```
Original file line number Diff line number Diff line change @@ -2157,10 +2157,10 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
21572157 return Vec :: new ( ) ;
21582158 }
21592159
2160- let ( doc_meta_item, inlined ) = self . attrs . lists ( sym:: doc) . get_word_attr ( sym:: inline) ;
2160+ let ( doc_meta_item, please_inline ) = self . attrs . lists ( sym:: doc) . get_word_attr ( sym:: inline) ;
21612161 let pub_underscore = self . vis . node . is_pub ( ) && self . name == kw:: Underscore ;
21622162
2163- if pub_underscore && inlined {
2163+ if pub_underscore && please_inline {
21642164 rustc_errors:: struct_span_err!(
21652165 cx. tcx. sess,
21662166 doc_meta_item. unwrap( ) . span( ) ,
@@ -2189,7 +2189,6 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
21892189 } ) ;
21902190 // Also check whether imports were asked to be inlined, in case we're trying to re-export a
21912191 // crate in Rust 2018+
2192- let please_inline = inlined;
21932192 let path = self . path . clean ( cx) ;
21942193 let inner = if self . glob {
21952194 if !denied {
You can’t perform that action at this time.
0 commit comments