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
2
2
3
3
Erroneous code example:
4
4
5
- ``` compile_fail,E0780,edition2018
6
- extern crate foo;
5
+ ``` ignore (cannot-doctest-multicrate-project)
7
6
8
7
#[doc(inline)] // error: invalid doc argument
9
8
pub use foo::Foo as _;
@@ -15,7 +14,6 @@ error, remove the `#[doc(inline)]` attribute.
15
14
Example:
16
15
17
16
``` ignore (cannot-doctest-multicrate-project)
18
- extern crate foo;
19
17
20
18
pub use foo::Foo as _;
21
19
```
Original file line number Diff line number Diff line change @@ -2157,10 +2157,10 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2157
2157
return Vec :: new ( ) ;
2158
2158
}
2159
2159
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) ;
2161
2161
let pub_underscore = self . vis . node . is_pub ( ) && self . name == kw:: Underscore ;
2162
2162
2163
- if pub_underscore && inlined {
2163
+ if pub_underscore && please_inline {
2164
2164
rustc_errors:: struct_span_err!(
2165
2165
cx. tcx. sess,
2166
2166
doc_meta_item. unwrap( ) . span( ) ,
@@ -2189,7 +2189,6 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
2189
2189
} ) ;
2190
2190
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
2191
2191
// crate in Rust 2018+
2192
- let please_inline = inlined;
2193
2192
let path = self . path . clean ( cx) ;
2194
2193
let inner = if self . glob {
2195
2194
if !denied {
You can’t perform that action at this time.
0 commit comments