diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:19:13 +0000 |
commit | 218caa410aa38c29984be31a5229b9fa717560ee (patch) | |
tree | c54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/rustdoc/synthetic_auto | |
parent | Releasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff) | |
download | rustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip |
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc/synthetic_auto')
-rw-r--r-- | src/test/rustdoc/synthetic_auto/basic.rs | 8 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/complex.rs | 42 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/crate-local.rs | 9 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs | 25 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/lifetimes.rs | 19 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/manual.rs | 14 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/negative.rs | 13 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/nested.rs | 19 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/no-redundancy.rs | 16 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/overflow.rs | 35 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/project.rs | 34 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/self-referential.rs | 29 | ||||
-rw-r--r-- | src/test/rustdoc/synthetic_auto/static-region.rs | 10 |
13 files changed, 0 insertions, 273 deletions
diff --git a/src/test/rustdoc/synthetic_auto/basic.rs b/src/test/rustdoc/synthetic_auto/basic.rs deleted file mode 100644 index 7c6a38865..000000000 --- a/src/test/rustdoc/synthetic_auto/basic.rs +++ /dev/null @@ -1,8 +0,0 @@ -// @has basic/struct.Foo.html -// @has - '//h3[@class="code-header"]' 'impl<T> Send for Foo<T>where T: Send' -// @has - '//h3[@class="code-header"]' 'impl<T> Sync for Foo<T>where T: Sync' -// @count - '//*[@id="implementations-list"]//*[@class="impl has-srclink"]' 0 -// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 5 -pub struct Foo<T> { - field: T, -} diff --git a/src/test/rustdoc/synthetic_auto/complex.rs b/src/test/rustdoc/synthetic_auto/complex.rs deleted file mode 100644 index 43393c21f..000000000 --- a/src/test/rustdoc/synthetic_auto/complex.rs +++ /dev/null @@ -1,42 +0,0 @@ -mod foo { - pub trait MyTrait<'a> { - type MyItem: ?Sized; - } - - pub struct Inner<'a, Q, R: ?Sized> { - field: Q, - field3: &'a u8, - my_foo: Foo<Q>, - field2: R, - } - - pub struct Outer<'a, T, K: ?Sized> { - my_inner: Inner<'a, T, K>, - } - - pub struct Foo<T> { - myfield: T, - } -} - -// @has complex/struct.NotOuter.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<'a, T, K: ?Sized> Send for Outer<'a, T, K>where K: for<'b> Fn((&'b bool, &'a u8)) \ -// -> &'b i8, T: MyTrait<'a>, <T as MyTrait<'a>>::MyItem: Copy, 'a: 'static" - -pub use foo::{Foo, Inner as NotInner, MyTrait as NotMyTrait, Outer as NotOuter}; - -unsafe impl<T> Send for Foo<T> -where - T: NotMyTrait<'static>, -{ -} - -unsafe impl<'a, Q, R: ?Sized> Send for NotInner<'a, Q, R> -where - Q: NotMyTrait<'a>, - <Q as NotMyTrait<'a>>::MyItem: Copy, - R: for<'b> Fn((&'b bool, &'a u8)) -> &'b i8, - Foo<Q>: Send, -{ -} diff --git a/src/test/rustdoc/synthetic_auto/crate-local.rs b/src/test/rustdoc/synthetic_auto/crate-local.rs deleted file mode 100644 index ed01f63f9..000000000 --- a/src/test/rustdoc/synthetic_auto/crate-local.rs +++ /dev/null @@ -1,9 +0,0 @@ -#![feature(auto_traits)] - -pub auto trait Banana {} - -// @has crate_local/struct.Peach.html -// @has - '//h3[@class="code-header"]' 'impl Banana for Peach' -// @has - '//h3[@class="code-header"]' 'impl Send for Peach' -// @has - '//h3[@class="code-header"]' 'impl Sync for Peach' -pub struct Peach; diff --git a/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs b/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs deleted file mode 100644 index 6f66b8e55..000000000 --- a/src/test/rustdoc/synthetic_auto/issue-72213-projection-lifetime.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Regression test for issue #72213 -// Tests that we don't ICE when we have projection predicates -// in our initial ParamEnv - -pub struct Lines<'a, L> -where - L: Iterator<Item = &'a ()>, -{ - words: std::iter::Peekable<Words<'a, L>>, -} - -pub struct Words<'a, L> { - _m: std::marker::PhantomData<&'a L>, -} - -impl<'a, L> Iterator for Words<'a, L> -where - L: Iterator<Item = &'a ()>, -{ - type Item = (); - - fn next(&mut self) -> Option<Self::Item> { - unimplemented!() - } -} diff --git a/src/test/rustdoc/synthetic_auto/lifetimes.rs b/src/test/rustdoc/synthetic_auto/lifetimes.rs deleted file mode 100644 index 33170a844..000000000 --- a/src/test/rustdoc/synthetic_auto/lifetimes.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub struct Inner<'a, T: 'a> { - field: &'a T, -} - -unsafe impl<'a, T> Send for Inner<'a, T> -where - 'a: 'static, - T: for<'b> Fn(&'b bool) -> &'a u8, -{} - -// @has lifetimes/struct.Foo.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<'c, K> Send for Foo<'c, K>where K: for<'b> Fn(&'b bool) -> &'c u8, 'c: 'static" -// -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<'c, K> Sync for Foo<'c, K>where K: Sync" -pub struct Foo<'c, K: 'c> { - inner_field: Inner<'c, K>, -} diff --git a/src/test/rustdoc/synthetic_auto/manual.rs b/src/test/rustdoc/synthetic_auto/manual.rs deleted file mode 100644 index 77c04ad2a..000000000 --- a/src/test/rustdoc/synthetic_auto/manual.rs +++ /dev/null @@ -1,14 +0,0 @@ -// @has manual/struct.Foo.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// 'impl<T> Sync for Foo<T>where T: Sync' -// -// @has - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// 'impl<T> Send for Foo<T>' -// -// @count - '//*[@id="trait-implementations-list"]//*[@class="impl has-srclink"]' 1 -// @count - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]' 4 -pub struct Foo<T> { - field: T, -} - -unsafe impl<T> Send for Foo<T> {} diff --git a/src/test/rustdoc/synthetic_auto/negative.rs b/src/test/rustdoc/synthetic_auto/negative.rs deleted file mode 100644 index 2c2c848a5..000000000 --- a/src/test/rustdoc/synthetic_auto/negative.rs +++ /dev/null @@ -1,13 +0,0 @@ -pub struct Inner<T: Copy> { - field: *mut T, -} - -// @has negative/struct.Outer.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<T> !Send for Outer<T>" -// -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<T> !Sync for Outer<T>" -pub struct Outer<T: Copy> { - inner_field: Inner<T>, -} diff --git a/src/test/rustdoc/synthetic_auto/nested.rs b/src/test/rustdoc/synthetic_auto/nested.rs deleted file mode 100644 index 423bf115a..000000000 --- a/src/test/rustdoc/synthetic_auto/nested.rs +++ /dev/null @@ -1,19 +0,0 @@ -pub struct Inner<T> { - field: T, -} - -unsafe impl<T> Send for Inner<T> -where - T: Copy, -{ -} - -// @has nested/struct.Foo.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// 'impl<T> Send for Foo<T>where T: Copy' -// -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// 'impl<T> Sync for Foo<T>where T: Sync' -pub struct Foo<T> { - inner_field: Inner<T>, -} diff --git a/src/test/rustdoc/synthetic_auto/no-redundancy.rs b/src/test/rustdoc/synthetic_auto/no-redundancy.rs deleted file mode 100644 index 59f336233..000000000 --- a/src/test/rustdoc/synthetic_auto/no-redundancy.rs +++ /dev/null @@ -1,16 +0,0 @@ -pub struct Inner<T> { - field: T, -} - -unsafe impl<T> Send for Inner<T> -where - T: Copy + Send, -{ -} - -// @has no_redundancy/struct.Outer.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<T> Send for Outer<T>where T: Send + Copy" -pub struct Outer<T> { - inner_field: Inner<T>, -} diff --git a/src/test/rustdoc/synthetic_auto/overflow.rs b/src/test/rustdoc/synthetic_auto/overflow.rs deleted file mode 100644 index 35a487c76..000000000 --- a/src/test/rustdoc/synthetic_auto/overflow.rs +++ /dev/null @@ -1,35 +0,0 @@ -// Tests that we don't fail with an overflow error for certain -// strange types -// See https://github.com/rust-lang/rust/pull/72936#issuecomment-643676915 - -pub trait Interner { - type InternedType; -} - -struct RustInterner<'tcx> { - foo: &'tcx () -} - -impl<'tcx> Interner for RustInterner<'tcx> { - type InternedType = Box<TyData<Self>>; -} - -enum TyData<I: Interner> { - FnDef(I::InternedType) -} - -struct VariableKind<I: Interner>(I::InternedType); - -// @has overflow/struct.BoundVarsCollector.html -// @has - '//h3[@class="code-header"]' "impl<'tcx> Send for BoundVarsCollector<'tcx>" -pub struct BoundVarsCollector<'tcx> { - val: VariableKind<RustInterner<'tcx>> -} - -fn is_send<T: Send>() {} - -struct MyInterner<'tcx> { - val: &'tcx () -} - -fn main() {} diff --git a/src/test/rustdoc/synthetic_auto/project.rs b/src/test/rustdoc/synthetic_auto/project.rs deleted file mode 100644 index 558ff2add..000000000 --- a/src/test/rustdoc/synthetic_auto/project.rs +++ /dev/null @@ -1,34 +0,0 @@ -pub struct Inner<'a, T: 'a> { - field: &'a T, -} - -trait MyTrait { - type MyItem; -} - -trait OtherTrait {} - -unsafe impl<'a, T> Send for Inner<'a, T> -where - 'a: 'static, - T: MyTrait<MyItem = bool>, -{ -} -unsafe impl<'a, T> Sync for Inner<'a, T> -where - 'a: 'static, - T: MyTrait, - <T as MyTrait>::MyItem: OtherTrait, -{ -} - -// @has project/struct.Foo.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<'c, K> Send for Foo<'c, K>where K: MyTrait<MyItem = bool>, 'c: 'static" -// -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<'c, K> Sync for Foo<'c, K>where K: MyTrait, <K as MyTrait>::MyItem: OtherTrait, \ -// 'c: 'static," -pub struct Foo<'c, K: 'c> { - inner_field: Inner<'c, K>, -} diff --git a/src/test/rustdoc/synthetic_auto/self-referential.rs b/src/test/rustdoc/synthetic_auto/self-referential.rs deleted file mode 100644 index c6ae96de7..000000000 --- a/src/test/rustdoc/synthetic_auto/self-referential.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Some unusual code minimized from -// https://github.com/sile/handy_async/tree/7b619b762c06544fc67792c8ff8ebc24a88fdb98 - -pub trait Pattern { - type Value; -} - -pub struct Constrain<A, B = A, C = A>(A, B, C); - -impl<A, B, C> Pattern for Constrain<A, B, C> - where A: Pattern, - B: Pattern<Value = A::Value>, - C: Pattern<Value = A::Value>, -{ - type Value = A::Value; -} - -pub struct Wrapper<T>(T); - -impl<T> Pattern for Wrapper<T> { - type Value = T; -} - - -// @has self_referential/struct.WriteAndThen.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<P1> Send for WriteAndThen<P1>where <P1 as Pattern>::Value: Send" -pub struct WriteAndThen<P1>(pub P1::Value,pub <Constrain<P1, Wrapper<P1::Value>> as Pattern>::Value) - where P1: Pattern; diff --git a/src/test/rustdoc/synthetic_auto/static-region.rs b/src/test/rustdoc/synthetic_auto/static-region.rs deleted file mode 100644 index 1a76cb919..000000000 --- a/src/test/rustdoc/synthetic_auto/static-region.rs +++ /dev/null @@ -1,10 +0,0 @@ -pub trait OwnedTrait<'a> { - type Reader; -} - -// @has static_region/struct.Owned.html -// @has - '//*[@id="synthetic-implementations-list"]//*[@class="impl has-srclink"]//h3[@class="code-header"]' \ -// "impl<T> Send for Owned<T>where <T as OwnedTrait<'static>>::Reader: Send" -pub struct Owned<T> where T: OwnedTrait<'static> { - marker: <T as OwnedTrait<'static>>::Reader, -} |