From 42ee400b0ffa7eeffb51e5b1e2e3fbcc6a130e0c Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Fri, 12 Jul 2024 18:16:30 -0700 Subject: Move assertion-free rustdoc ice tests to rustdoc-ui --- tests/rustdoc-ui/ice-assoc-type-loop-102154.rs | 16 ++++++++++++++++ .../ice-method-where-clause-circular-100620.rs | 22 ++++++++++++++++++++++ tests/rustdoc-ui/ice-unresolved-import-100241.rs | 14 ++++++++++++++ tests/rustdoc/ice-assoc-type-loop-102154.rs | 15 --------------- .../ice-method-where-clause-circular-100620.rs | 21 --------------------- tests/rustdoc/ice-unresolved-import-100241.rs | 14 -------------- 6 files changed, 52 insertions(+), 50 deletions(-) create mode 100644 tests/rustdoc-ui/ice-assoc-type-loop-102154.rs create mode 100644 tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs create mode 100644 tests/rustdoc-ui/ice-unresolved-import-100241.rs delete mode 100644 tests/rustdoc/ice-assoc-type-loop-102154.rs delete mode 100644 tests/rustdoc/ice-method-where-clause-circular-100620.rs delete mode 100644 tests/rustdoc/ice-unresolved-import-100241.rs (limited to 'tests') diff --git a/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs new file mode 100644 index 00000000000..68e22ce6ea1 --- /dev/null +++ b/tests/rustdoc-ui/ice-assoc-type-loop-102154.rs @@ -0,0 +1,16 @@ +//@ check-pass +// https://github.com/rust-lang/rust/issues/102154 + +trait A { + type B; +} +type MaybeBox = >>::B; +struct P { + t: MaybeBox

+} +impl A for P { + type B = N; +} +fn main() { + let t: MaybeBox

; +} diff --git a/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs new file mode 100644 index 00000000000..e12b214410b --- /dev/null +++ b/tests/rustdoc-ui/ice-method-where-clause-circular-100620.rs @@ -0,0 +1,22 @@ +//@ check-pass +// https://github.com/rust-lang/rust/issues/100620 + +pub trait Bar {} + +pub trait Qux {} + +pub trait Foo { + fn bar() + where + T: Bar, + { + } +} + +pub struct Concrete; + +impl Foo<(), S> for Concrete {} + +impl Bar for T where S: Qux {} + +impl Qux for S where T: Bar {} diff --git a/tests/rustdoc-ui/ice-unresolved-import-100241.rs b/tests/rustdoc-ui/ice-unresolved-import-100241.rs new file mode 100644 index 00000000000..eef4b8355bf --- /dev/null +++ b/tests/rustdoc-ui/ice-unresolved-import-100241.rs @@ -0,0 +1,14 @@ +//! See [`S`]. + +// Check that this isn't an ICE +//@ should-fail + +// https://github.com/rust-lang/rust/issues/100241 + +mod foo { + pub use inner::S; + //~^ ERROR unresolved imports `inner`, `foo::S` +} + +use foo::*; +use foo::S; diff --git a/tests/rustdoc/ice-assoc-type-loop-102154.rs b/tests/rustdoc/ice-assoc-type-loop-102154.rs deleted file mode 100644 index 58cabe76927..00000000000 --- a/tests/rustdoc/ice-assoc-type-loop-102154.rs +++ /dev/null @@ -1,15 +0,0 @@ -// https://github.com/rust-lang/rust/issues/102154 - -trait A { - type B; -} -type MaybeBox = >>::B; -struct P { - t: MaybeBox

-} -impl A for P { - type B = N; -} -fn main() { - let t: MaybeBox

; -} diff --git a/tests/rustdoc/ice-method-where-clause-circular-100620.rs b/tests/rustdoc/ice-method-where-clause-circular-100620.rs deleted file mode 100644 index 39d70bab29e..00000000000 --- a/tests/rustdoc/ice-method-where-clause-circular-100620.rs +++ /dev/null @@ -1,21 +0,0 @@ -// https://github.com/rust-lang/rust/issues/100620 - -pub trait Bar {} - -pub trait Qux {} - -pub trait Foo { - fn bar() - where - T: Bar, - { - } -} - -pub struct Concrete; - -impl Foo<(), S> for Concrete {} - -impl Bar for T where S: Qux {} - -impl Qux for S where T: Bar {} diff --git a/tests/rustdoc/ice-unresolved-import-100241.rs b/tests/rustdoc/ice-unresolved-import-100241.rs deleted file mode 100644 index eef4b8355bf..00000000000 --- a/tests/rustdoc/ice-unresolved-import-100241.rs +++ /dev/null @@ -1,14 +0,0 @@ -//! See [`S`]. - -// Check that this isn't an ICE -//@ should-fail - -// https://github.com/rust-lang/rust/issues/100241 - -mod foo { - pub use inner::S; - //~^ ERROR unresolved imports `inner`, `foo::S` -} - -use foo::*; -use foo::S; -- cgit 1.4.1-3-g733a5