Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
3938541
tests: add test for warning-free builds of `core` under `no_global_oo…
ojeda Apr 21, 2023
73b6574
Fix Unreadable non-UTF-8 output on localized MSVC
ChrisDenton Apr 20, 2023
9b9d39e
Abstract `MultiByteToWideChar`
ChrisDenton Apr 27, 2023
107d480
improve error notes for packed struct reference diagnostic
bindsdev Apr 29, 2023
344dd0e
Make `repr` attribute local_only
GuillaumeGomez Apr 28, 2023
63028ac
Do not force anonymous lifetimes in consts to be static.
cjgillot Apr 29, 2023
5fa9751
Move some rustdoc-ui tests to subdirectories
jyn514 Apr 29, 2023
5da288f
move lint tests into subdirectories
jyn514 Apr 29, 2023
57aac3f
Improve internal field comments on `slice::Iter(Mut)`
scottmcm Apr 29, 2023
61b6f65
Get `repr` information through `AdtDef` for foreign items
GuillaumeGomez Apr 28, 2023
89b0956
Fix display of attributes for enums
GuillaumeGomez Apr 29, 2023
2693e20
Extend foreign inlined item with `#[repr()]` test
GuillaumeGomez Apr 29, 2023
b778688
Unify attributes retrieval for JSON and HTML rendering
GuillaumeGomez Apr 29, 2023
734e866
Rollup merge of #110586 - ChrisDenton:msvc-oem-output, r=workingjubilee
matthiaskrgr Apr 29, 2023
e4daa81
Rollup merge of #110652 - ojeda:core-no_global_oom_handling-test, r=M…
matthiaskrgr Apr 29, 2023
791d33c
Rollup merge of #110973 - bindsdev:packed-struct-ref-diagnostic-note,…
matthiaskrgr Apr 29, 2023
4b79276
Rollup merge of #110981 - jyn514:rustdoc-tests, r=notriddle
matthiaskrgr Apr 29, 2023
549b3a1
Rollup merge of #110983 - GuillaumeGomez:foreign-repr, r=notriddle
matthiaskrgr Apr 29, 2023
a656a20
Rollup merge of #110984 - cjgillot:const-infer-lifetime, r=compiler-e…
matthiaskrgr Apr 29, 2023
f720813
Rollup merge of #110997 - scottmcm:slice-iter-comments, r=the8472
matthiaskrgr Apr 29, 2023
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
// compile-flags:--test --test-args --test-threads=1
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

// Crates like core have doctests gated on `cfg(not(test))` so we need to make
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check-pass
// compile-flags: --test --nocapture --check-cfg=values(feature,"test") -Z unstable-options
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// The doctest will produce a warning because feature invalid is unexpected
Expand Down
11 changes: 11 additions & 0 deletions tests/rustdoc-ui/doctest/check-cfg-test.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
warning: unexpected `cfg` condition value
--> $DIR/check-cfg-test.rs:9:7
|
LL | #[cfg(feature = "invalid")]
| ^^^^^^^^^^^^^^^^^^^
|
= note: expected values for `feature` are: test
= note: `#[warn(unexpected_cfgs)]` on by default

warning: 1 warning emitted

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// check-pass
// edition:2018
// compile-flags:--test --test-args=--show-output
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Regression test for #97440: Multiline inner attribute triggers ICE during doctest
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// check-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// check-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

// Make sure `cfg(doctest)` is set when finding doctests but not inside
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

#![feature(doc_cfg)]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags:--test --test-args=--test-threads=1
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// check-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// edition:2018
// aux-build:extern_macros.rs
// compile-flags:--test --test-args=--test-threads=1
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// check-pass

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// adapted to use that, and that normalize line can go away

// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// adapted to use that, and that normalize line can go away

// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// adapted to use that, and that normalize line can go away

// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// compile-flags:--test --test-args --test-threads=1
// rustc-env:RUST_BACKTRACE=0
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

// compile-flags:--test --test-args --test-threads=1
// rustc-env:RUST_BACKTRACE=0
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// adapted to use that, and that normalize line can go away

// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

// check-pass
// compile-flags:-Z unstable-options --test --no-run --test-args=--test-threads=1
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// check-pass
// compile-flags:--test -Zunstable-options --nocapture
// normalize-stderr-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stderr-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```compile_fail
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
// compile-flags:--test -Zunstable-options --nocapture
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,20 @@
// check-pass
// [correct]compile-flags:--test --test-run-directory={{src-base}}
// [incorrect]compile-flags:--test --test-run-directory={{src-base}}/coverage
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
/// assert_eq!(
/// std::fs::read_to_string("run-directory.rs").unwrap(),
/// std::fs::read_to_string("doctest/run-directory.rs").unwrap(),
/// include_str!("run-directory.rs"),
/// );
/// ```
#[cfg(correct)]
pub fn foo() {}

/// ```
/// assert!(std::fs::read_to_string("run-directory.rs").is_err());
/// assert!(std::fs::read_to_string("doctest/run-directory.rs").is_err());
/// ```
#[cfg(incorrect)]
pub fn foo() {}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// check-pass

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// compile-flags: --test --test-args=--test-threads=1
// check-pass
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

/// ```
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags: --test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/doctest" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101
// rustc-env: RUST_BACKTRACE=0
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// check-pass
// compile-flags:--test
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"

pub fn test() -> Result<(), ()> {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// compile-flags:--test --error-format=short
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// compile-flags: --test --crate-name=empty_fn --extern=empty_fn --test-args=--test-threads=1
// aux-build:empty-fn.rs
// check-pass
// normalize-stdout-test: "tests/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test: "tests/rustdoc-ui/issues" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// edition:2021

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.