Skip to content

Commit 8a4e7a7

Browse files
committed
Fix tests
1 parent b3b74a9 commit 8a4e7a7

File tree

2 files changed

+3
-6
lines changed
  • compiler/rustc_error_codes/src/error_codes
  • src/librustdoc/clean

2 files changed

+3
-6
lines changed

compiler/rustc_error_codes/src/error_codes/E0780.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ Cannot use `doc(inline)` with anonymous imports
22

33
Erroneous 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
98
pub use foo::Foo as _;
@@ -15,7 +14,6 @@ error, remove the `#[doc(inline)]` attribute.
1514
Example:
1615

1716
```ignore (cannot-doctest-multicrate-project)
18-
extern crate foo;
1917
2018
pub use foo::Foo as _;
2119
```

src/librustdoc/clean/mod.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff 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 {

0 commit comments

Comments
 (0)