Skip to content

Rustdoc unit tests not being run by Rustbuild #44237

@nrc

Description

@nrc

As far as we could tell.

Currently, running cargo test in src/librustdoc seems to work, but there are some failures:

   Doc-tests rustdoc

running 3 tests
test clean/simplify.rs - clean::simplify (line 24) ... FAILED
test clean/simplify.rs - clean::simplify (line 20) ... FAILED
test html/markdown.rs - html::markdown (line 18) ... FAILED

failures:

---- clean/simplify.rs - clean::simplify (line 24) stdout ----
	error: expected expression, found keyword `where`
 --> clean/simplify.rs:2:1
  |
2 | where T: Trait, <T as Trait>::Foo = Bar
  | ^^^^^

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12

---- clean/simplify.rs - clean::simplify (line 20) stdout ----
	error: expected expression, found keyword `where`
 --> clean/simplify.rs:2:1
  |
2 | where T: Trait<Foo=Bar>
  | ^^^^^

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12
note: Run with `RUST_BACKTRACE=1` for a backtrace.

---- html/markdown.rs - html::markdown (line 18) stdout ----
	error[E0061]: this function takes 2 parameters but 1 parameter was supplied
 --> html/markdown.rs:6:35
  |
6 | let html = format!("{}", Markdown(s));
  |                                   ^ expected 2 parameters

thread 'rustc' panicked at 'couldn't compile the test', /checkout/src/librustdoc/test.rs:280:12


failures:
    clean/simplify.rs - clean::simplify (line 20)
    clean/simplify.rs - clean::simplify (line 24)
    html/markdown.rs - html::markdown (line 18)

test result: FAILED. 0 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out

Metadata

Metadata

Labels

A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-bugCategory: This is a bug.T-dev-toolsRelevant to the dev-tools subteam, which will review and decide on the PR/issue.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions