Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0urobor0s committed Dec 23, 2020
1 parent b3b74a9 commit 8a4e7a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
4 changes: 1 addition & 3 deletions compiler/rustc_error_codes/src/error_codes/E0780.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ Cannot use `doc(inline)` with anonymous imports

Erroneous code example:

```compile_fail,E0780,edition2018
extern crate foo;
```ignore (cannot-doctest-multicrate-project)
#[doc(inline)] // error: invalid doc argument
pub use foo::Foo as _;
Expand All @@ -15,7 +14,6 @@ error, remove the `#[doc(inline)]` attribute.
Example:

```ignore (cannot-doctest-multicrate-project)
extern crate foo;
pub use foo::Foo as _;
```
5 changes: 2 additions & 3 deletions src/librustdoc/clean/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2157,10 +2157,10 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
return Vec::new();
}

let (doc_meta_item, inlined) = self.attrs.lists(sym::doc).get_word_attr(sym::inline);
let (doc_meta_item, please_inline) = self.attrs.lists(sym::doc).get_word_attr(sym::inline);
let pub_underscore = self.vis.node.is_pub() && self.name == kw::Underscore;

if pub_underscore && inlined {
if pub_underscore && please_inline {
rustc_errors::struct_span_err!(
cx.tcx.sess,
doc_meta_item.unwrap().span(),
Expand Down Expand Up @@ -2189,7 +2189,6 @@ impl Clean<Vec<Item>> for doctree::Import<'_> {
});
// Also check whether imports were asked to be inlined, in case we're trying to re-export a
// crate in Rust 2018+
let please_inline = inlined;
let path = self.path.clean(cx);
let inner = if self.glob {
if !denied {
Expand Down

0 comments on commit 8a4e7a7

Please sign in to comment.