Skip to content

Commit 16120e9

Browse files
committed
rollup merge of #21693: tomjakubowski/rustdoc-fix-21442
Fix #21442
2 parents b70ec4d + 1cf684c commit 16120e9

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

src/librustdoc/clean/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2249,7 +2249,7 @@ impl Clean<ViewListIdent> for ast::PathListItem {
22492249
source: resolve_def(cx, id)
22502250
},
22512251
ast::PathListMod { id } => ViewListIdent {
2252-
name: "mod".to_string(),
2252+
name: "self".to_string(),
22532253
source: resolve_def(cx, id)
22542254
}
22552255
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
-include ../tools.mk
2+
3+
all: foo.rs
4+
$(HOST_RPATH_ENV) $(RUSTDOC) -w html -o $(TMPDIR)/doc foo.rs
5+
$(HTMLDOCCK) $(TMPDIR)/doc foo.rs
6+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
pub mod io {
12+
pub trait Reader { }
13+
}
14+
15+
pub enum Maybe<A> {
16+
Just(A),
17+
Nothing
18+
}
19+
20+
// @has foo/prelude/index.html
21+
pub mod prelude {
22+
// @has foo/prelude/index.html '//code' 'pub use io::{self, Reader}'
23+
#[doc(no_inline)] pub use io::{self, Reader};
24+
// @has foo/prelude/index.html '//code' 'pub use Maybe::{self, Just, Nothing}'
25+
#[doc(no_inline)] pub use Maybe::{self, Just, Nothing};
26+
}

0 commit comments

Comments
 (0)