diff options
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/rustdoc-gui/docblock-code-block-line-number.goml | 17 | ||||
| -rw-r--r-- | src/test/rustdoc-gui/source-anchor-scroll.goml | 2 | ||||
| -rw-r--r-- | src/test/rustdoc-ui/normalize-cycle.rs | 1 | ||||
| -rw-r--r-- | src/test/rustdoc/where.SWhere_TraitWhere_item-decl.html | 7 | ||||
| -rw-r--r-- | src/test/rustdoc/where.rs | 12 | ||||
| -rw-r--r-- | src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/higher-rank-trait-bounds/issue-95034.rs | 20 | ||||
| -rw-r--r-- | src/test/ui/higher-rank-trait-bounds/issue-95034.stderr | 1 | ||||
| -rw-r--r-- | src/test/ui/lexical-scopes.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr | 2 | ||||
| -rw-r--r-- | src/test/ui/span/issue-35987.stderr | 2 |
11 files changed, 42 insertions, 26 deletions
diff --git a/src/test/rustdoc-gui/docblock-code-block-line-number.goml b/src/test/rustdoc-gui/docblock-code-block-line-number.goml index baf9651c40d..ebfffbce715 100644 --- a/src/test/rustdoc-gui/docblock-code-block-line-number.goml +++ b/src/test/rustdoc-gui/docblock-code-block-line-number.goml @@ -20,3 +20,20 @@ assert-css: ("pre.line-number", { }) // The first code block has two lines so let's check its `<pre>` elements lists both of them. assert-text: ("pre.line-number", "1\n2") + +// Now, try changing the setting dynamically. We'll turn it off, using the settings menu, +// and make sure it goes away. + +// First, open the settings menu. +click: "#settings-menu" +wait-for: "#settings" +assert-css: ("#settings", {"display": "block"}) + +// Then, click the toggle button. +click: "input#line-numbers + .slider" +wait-for: 100 // wait-for-false does not exist +assert-false: "pre.line-number" + +// Finally, turn it on again. +click: "input#line-numbers + .slider" +wait-for: "pre.line-number" diff --git a/src/test/rustdoc-gui/source-anchor-scroll.goml b/src/test/rustdoc-gui/source-anchor-scroll.goml index 4e51c8dcac0..47e40aa8e3b 100644 --- a/src/test/rustdoc-gui/source-anchor-scroll.goml +++ b/src/test/rustdoc-gui/source-anchor-scroll.goml @@ -10,7 +10,7 @@ assert-property: ("html", {"scrollTop": "0"}) click: '//a[text() = "barbar"]' assert-property: ("html", {"scrollTop": "125"}) click: '//a[text() = "bar"]' -assert-property: ("html", {"scrollTop": "166"}) +assert-property: ("html", {"scrollTop": "156"}) click: '//a[text() = "sub_fn"]' assert-property: ("html", {"scrollTop": "53"}) diff --git a/src/test/rustdoc-ui/normalize-cycle.rs b/src/test/rustdoc-ui/normalize-cycle.rs index 14ffac1e1dc..1ed9ac6bc34 100644 --- a/src/test/rustdoc-ui/normalize-cycle.rs +++ b/src/test/rustdoc-ui/normalize-cycle.rs @@ -1,4 +1,5 @@ // check-pass +// compile-flags: -Znormalize-docs // Regression test for <https://github.com/rust-lang/rust/issues/79459>. pub trait Query {} diff --git a/src/test/rustdoc/where.SWhere_TraitWhere_item-decl.html b/src/test/rustdoc/where.SWhere_TraitWhere_item-decl.html index 0fbdc0c9cd1..24ab77703d1 100644 --- a/src/test/rustdoc/where.SWhere_TraitWhere_item-decl.html +++ b/src/test/rustdoc/where.SWhere_TraitWhere_item-decl.html @@ -1,3 +1,8 @@ <div class="item-decl"><pre class="rust trait"><code>pub trait TraitWhere { - type <a href="#associatedtype.Item" class="associatedtype">Item</a><'a><br />   <span class="where">where<br />        Self: 'a</span>; + type <a href="#associatedtype.Item" class="associatedtype">Item</a><'a><br />    <span class="where">where<br />        Self: 'a</span>; + + fn <a href="#method.func" class="fnname">func</a>(self)<br />    <span class="where">where<br />        Self: <a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } +<span class="item-spacer" /> fn <a href="#method.lines" class="fnname">lines</a>(self) -> <a class="struct" href="{{channel}}/std/io/struct.Lines.html" title="struct std::io::Lines">Lines</a><Self><br />    <span class="where">where<br />        Self: <a class="trait" href="{{channel}}/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a></span>, + { ... } }</code></pre></div> \ No newline at end of file diff --git a/src/test/rustdoc/where.rs b/src/test/rustdoc/where.rs index 8818d74ddd0..68a146bfa55 100644 --- a/src/test/rustdoc/where.rs +++ b/src/test/rustdoc/where.rs @@ -1,5 +1,7 @@ #![crate_name = "foo"] +use std::io::Lines; + pub trait MyTrait { fn dummy(&self) { } } // @has foo/struct.Alpha.html '//pre' "pub struct Alpha<A>(_)where A: MyTrait" @@ -29,6 +31,16 @@ where // @snapshot SWhere_TraitWhere_item-decl - '//div[@class="item-decl"]' pub trait TraitWhere { type Item<'a> where Self: 'a; + + fn func(self) + where + Self: Sized + {} + + fn lines(self) -> Lines<Self> + where + Self: Sized, + { todo!() } } // @has foo/struct.Echo.html '//*[@class="impl has-srclink"]//h3[@class="code-header in-band"]' \ diff --git a/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr b/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr index 5ad457d547a..c3e2f8e1646 100644 --- a/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr +++ b/src/test/ui/const-generics/generic_const_exprs/issue-69654.stderr @@ -4,7 +4,7 @@ error[E0423]: expected value, found type parameter `T` LL | impl<T> Bar<T> for [u8; T] {} | - ^ not a value | | - | found this type pararmeter + | found this type parameter error[E0599]: the function or associated item `foo` exists for struct `Foo<_>`, but its trait bounds were not satisfied --> $DIR/issue-69654.rs:17:10 diff --git a/src/test/ui/higher-rank-trait-bounds/issue-95034.rs b/src/test/ui/higher-rank-trait-bounds/issue-95034.rs index d8edbe7e56b..af4946a187f 100644 --- a/src/test/ui/higher-rank-trait-bounds/issue-95034.rs +++ b/src/test/ui/higher-rank-trait-bounds/issue-95034.rs @@ -1,23 +1,5 @@ -// known-bug: #95034 -// failure-status: 101 +// check-pass // compile-flags: --edition=2021 --crate-type=lib -// rustc-env:RUST_BACKTRACE=0 - -// normalize-stderr-test "thread 'rustc' panicked.*" -> "thread 'rustc' panicked" -// normalize-stderr-test "note:.*RUST_BACKTRACE=1.*\n" -> "" -// normalize-stderr-test "\nerror: internal compiler error.*\n\n" -> "" -// normalize-stderr-test "note:.*unexpectedly panicked.*\n\n" -> "" -// normalize-stderr-test "note: we would appreciate a bug report.*\n\n" -> "" -// normalize-stderr-test "note: compiler flags.*\n\n" -> "" -// normalize-stderr-test "note: rustc.*running on.*\n\n" -> "" -// normalize-stderr-test "query stack during panic:\n" -> "" -// normalize-stderr-test "we're just showing a limited slice of the query stack\n" -> "" -// normalize-stderr-test "end of query stack\n" -> "" -// normalize-stderr-test "#.*\n" -> "" - -// This should not ICE. - -// Refer to the issue for more minimized versions. use std::{ future::Future, diff --git a/src/test/ui/higher-rank-trait-bounds/issue-95034.stderr b/src/test/ui/higher-rank-trait-bounds/issue-95034.stderr deleted file mode 100644 index 1d8329142fc..00000000000 --- a/src/test/ui/higher-rank-trait-bounds/issue-95034.stderr +++ /dev/null @@ -1 +0,0 @@ -thread 'rustc' panicked diff --git a/src/test/ui/lexical-scopes.stderr b/src/test/ui/lexical-scopes.stderr index ad11f72a31d..08e4be2c0c3 100644 --- a/src/test/ui/lexical-scopes.stderr +++ b/src/test/ui/lexical-scopes.stderr @@ -2,7 +2,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `T` --> $DIR/lexical-scopes.rs:3:13 | LL | fn f<T>() { - | - found this type pararmeter + | - found this type parameter LL | let t = T { i: 0 }; | ^ not a struct, variant or union type diff --git a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr index d9c404e94ac..af9f4612ab3 100644 --- a/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr +++ b/src/test/ui/resolve/point-at-type-parameter-shadowing-another-type.stderr @@ -2,7 +2,7 @@ error[E0574]: expected struct, variant or union type, found type parameter `Baz` --> $DIR/point-at-type-parameter-shadowing-another-type.rs:16:13 | LL | impl<Baz> Foo<Baz> for Bar { - | --- found this type pararmeter + | --- found this type parameter ... LL | Baz { num } => num, | ^^^ not a struct, variant or union type diff --git a/src/test/ui/span/issue-35987.stderr b/src/test/ui/span/issue-35987.stderr index ea9c4c82c36..d8fddc8007f 100644 --- a/src/test/ui/span/issue-35987.stderr +++ b/src/test/ui/span/issue-35987.stderr @@ -4,7 +4,7 @@ error[E0404]: expected trait, found type parameter `Add` LL | impl<T: Clone, Add> Add for Foo<T> { | --- ^^^ not a trait | | - | found this type pararmeter + | found this type parameter | help: consider importing this trait instead | |
