diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/rustdoc-js-std/unbox-type-result.js | 20 | ||||
| -rw-r--r-- | tests/rustdoc-js/generics-unbox.js | 6 | ||||
| -rw-r--r-- | tests/rustdoc-js/generics-unbox.rs | 12 | ||||
| -rw-r--r-- | tests/ui/README.md | 35 | ||||
| -rw-r--r-- | tests/ui/bootstrap/self-test/a.rs | 2 | ||||
| -rw-r--r-- | tests/ui/bootstrap/self-test/b.rs | 2 | ||||
| -rw-r--r-- | tests/ui/lint/unknown-lints/other.rs | 2 | ||||
| -rw-r--r-- | tests/ui/precondition-checks/read.rs | 2 | ||||
| -rw-r--r-- | tests/ui/precondition-checks/write.rs | 2 | ||||
| -rw-r--r-- | tests/ui/precondition-checks/write_bytes.rs | 2 | ||||
| -rw-r--r-- | tests/ui/traits/next-solver/object-soundness-requires-generalization.rs | 2 |
11 files changed, 45 insertions, 42 deletions
diff --git a/tests/rustdoc-js-std/unbox-type-result.js b/tests/rustdoc-js-std/unbox-type-result.js new file mode 100644 index 00000000000..1f5cba58adf --- /dev/null +++ b/tests/rustdoc-js-std/unbox-type-result.js @@ -0,0 +1,20 @@ +// exact-check + +// Test case for https://github.com/rust-lang/rust/issues/139665 +// make sure that std::io::Result and std::thread::Result get unboxed + +const EXPECTED = [ + { + query: "File -> Metadata", + others: [ + { path: "std::fs::File", name: "metadata" }, + { path: "std::fs::File", name: "metadata_at" }, + ] + }, + { + query: "JoinHandle<T> -> T", + others: [ + { path: "std::thread::JoinHandle", name: "join" }, + ] + }, +]; diff --git a/tests/rustdoc-js/generics-unbox.js b/tests/rustdoc-js/generics-unbox.js index 6baf00c814b..a4f2ba8e3a6 100644 --- a/tests/rustdoc-js/generics-unbox.js +++ b/tests/rustdoc-js/generics-unbox.js @@ -31,4 +31,10 @@ const EXPECTED = [ { 'path': 'generics_unbox', 'name': 'beta' }, ], }, + { + 'query': '-> Sigma', + 'others': [ + { 'path': 'generics_unbox', 'name': 'delta' }, + ], + }, ]; diff --git a/tests/rustdoc-js/generics-unbox.rs b/tests/rustdoc-js/generics-unbox.rs index c2578575997..b16e35ee3d4 100644 --- a/tests/rustdoc-js/generics-unbox.rs +++ b/tests/rustdoc-js/generics-unbox.rs @@ -42,3 +42,15 @@ pub fn beta<T, U>(_: Inside<T>) -> Out<Out3<T, U>, Out4<U, T>> { pub fn gamma<T, U>(_: Inside<T>) -> Out<Out3<U, T>, Out4<T, U>> { loop {} } + +pub fn delta(_: i32) -> Epsilon<Sigma> { + loop {} +} + +#[doc(search_unbox)] +pub struct Theta<T>(T); + +#[doc(search_unbox)] +pub type Epsilon<T> = Theta<T>; + +pub struct Sigma; diff --git a/tests/ui/README.md b/tests/ui/README.md deleted file mode 100644 index aa36481ae06..00000000000 --- a/tests/ui/README.md +++ /dev/null @@ -1,35 +0,0 @@ -# UI Tests - -This folder contains `rustc`'s -[UI tests](https://rustc-dev-guide.rust-lang.org/tests/ui.html). - -## Test Directives (Headers) - -Typically, a UI test will have some test directives / headers which are -special comments that tell compiletest how to build and interpret a test. - -As part of an ongoing effort to rewrite compiletest -(see <https://github.com/rust-lang/compiler-team/issues/536>), a major -change proposal to change legacy compiletest-style headers `// <directive>` -to [`ui_test`](https://github.com/oli-obk/ui_test)-style headers -`//@ <directive>` was accepted (see -<https://github.com/rust-lang/compiler-team/issues/512>. - -An example directive is `ignore-test`. In legacy compiletest style, the header -would be written as - -```rs -// ignore-test -``` - -but in `ui_test` style, the header would be written as - -```rs -//@ ignore-test -``` - -compiletest is changed to accept only `//@` directives for UI tests -(currently), and will reject and report an error if it encounters any -comments `// <content>` that may be parsed as a legacy compiletest-style -test header. To fix this, you should migrate to the `ui_test`-style header -`//@ <content>`. diff --git a/tests/ui/bootstrap/self-test/a.rs b/tests/ui/bootstrap/self-test/a.rs index 64d2d6f11bb..b8abd8179c9 100644 --- a/tests/ui/bootstrap/self-test/a.rs +++ b/tests/ui/bootstrap/self-test/a.rs @@ -1,2 +1,2 @@ //! Not used by compiler, this is used by bootstrap cli self-test. -//@ ignore-test +//@ ignore-test (used by bootstrap) diff --git a/tests/ui/bootstrap/self-test/b.rs b/tests/ui/bootstrap/self-test/b.rs index 91f92f67910..5bbd2f946fe 100644 --- a/tests/ui/bootstrap/self-test/b.rs +++ b/tests/ui/bootstrap/self-test/b.rs @@ -1,2 +1,2 @@ //! Not used by compiler, used by bootstrap cli self-test. -//@ ignore-test +//@ ignore-test (used by bootstrap) diff --git a/tests/ui/lint/unknown-lints/other.rs b/tests/ui/lint/unknown-lints/other.rs index f917bff6d60..25333584916 100644 --- a/tests/ui/lint/unknown-lints/other.rs +++ b/tests/ui/lint/unknown-lints/other.rs @@ -1,4 +1,4 @@ -//@ ignore-test +//@ ignore-test (auxiliary) // Companion to allow-in-other-module.rs diff --git a/tests/ui/precondition-checks/read.rs b/tests/ui/precondition-checks/read.rs index ab9921a0cee..d5ab7773987 100644 --- a/tests/ui/precondition-checks/read.rs +++ b/tests/ui/precondition-checks/read.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::read requires //@ revisions: null misaligned -//@ ignore-test +//@ ignore-test (unimplemented) use std::ptr; diff --git a/tests/ui/precondition-checks/write.rs b/tests/ui/precondition-checks/write.rs index f76e776fcf3..5d6b9586fad 100644 --- a/tests/ui/precondition-checks/write.rs +++ b/tests/ui/precondition-checks/write.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::write requires //@ revisions: null misaligned -//@ ignore-test +//@ ignore-test (unimplemented) use std::ptr; diff --git a/tests/ui/precondition-checks/write_bytes.rs b/tests/ui/precondition-checks/write_bytes.rs index 3f64be9d1ee..be4f5a089f0 100644 --- a/tests/ui/precondition-checks/write_bytes.rs +++ b/tests/ui/precondition-checks/write_bytes.rs @@ -2,7 +2,7 @@ //@ compile-flags: -Copt-level=3 -Cdebug-assertions=no -Zub-checks=yes //@ error-pattern: unsafe precondition(s) violated: ptr::write requires //@ revisions: null misaligned -//@ ignore-test +//@ ignore-test (unimplemented) use std::ptr; diff --git a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs index 11a2617ad42..3ef6bea4fd5 100644 --- a/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs +++ b/tests/ui/traits/next-solver/object-soundness-requires-generalization.rs @@ -1,5 +1,5 @@ //@ compile-flags: -Znext-solver -//@ ignore-test +//@ ignore-test (see #114196) trait Trait { type Gat<'lt>; |
