diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:03:36 +0000 |
commit | 17d40c6057c88f4c432b0d7bac88e1b84cb7e67f (patch) | |
tree | 3f66c4a5918660bb8a758ab6cda5ff8ee4f6cdcd /src/test/rustdoc-json/lifetime | |
parent | Adding upstream version 1.64.0+dfsg1. (diff) | |
download | rustc-upstream/1.65.0+dfsg1.tar.xz rustc-upstream/1.65.0+dfsg1.zip |
Adding upstream version 1.65.0+dfsg1.upstream/1.65.0+dfsg1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/rustdoc-json/lifetime')
-rw-r--r-- | src/test/rustdoc-json/lifetime/longest.rs | 40 | ||||
-rw-r--r-- | src/test/rustdoc-json/lifetime/outlives.rs | 34 |
2 files changed, 37 insertions, 37 deletions
diff --git a/src/test/rustdoc-json/lifetime/longest.rs b/src/test/rustdoc-json/lifetime/longest.rs index 95b99599e..326dab8e5 100644 --- a/src/test/rustdoc-json/lifetime/longest.rs +++ b/src/test/rustdoc-json/lifetime/longest.rs @@ -3,30 +3,30 @@ #![feature(no_core)] #![no_core] -// @is longest.json "$.index[*][?(@.name=='longest')].inner.generics.params[0].name" \"\'a\" -// @is - "$.index[*][?(@.name=='longest')].inner.generics.params[0].kind" '{"lifetime": {"outlives": []}}' -// @is - "$.index[*][?(@.name=='longest')].inner.generics.params[0].kind" '{"lifetime": {"outlives": []}}' -// @count - "$.index[*][?(@.name=='longest')].inner.generics.params[*]" 1 -// @is - "$.index[*][?(@.name=='longest')].inner.generics.where_predicates" [] +// @is "$.index[*][?(@.name=='longest')].inner.generics.params[0].name" \"\'a\" +// @is "$.index[*][?(@.name=='longest')].inner.generics.params[0].kind" '{"lifetime": {"outlives": []}}' +// @is "$.index[*][?(@.name=='longest')].inner.generics.params[0].kind" '{"lifetime": {"outlives": []}}' +// @count "$.index[*][?(@.name=='longest')].inner.generics.params[*]" 1 +// @is "$.index[*][?(@.name=='longest')].inner.generics.where_predicates" [] -// @count - "$.index[*][?(@.name=='longest')].inner.decl.inputs[*]" 2 -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][0]" '"l"' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][0]" '"r"' +// @count "$.index[*][?(@.name=='longest')].inner.decl.inputs[*]" 2 +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][0]" '"l"' +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][0]" '"r"' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].kind" '"borrowed_ref"' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.lifetime" \"\'a\" -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.mutable" false -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.type" '{"inner": "str", "kind": "primitive"}' +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.lifetime" \"\'a\" +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.mutable" false +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[0][1].inner.type" '{"inner": "str", "kind": "primitive"}' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].kind" '"borrowed_ref"' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.lifetime" \"\'a\" -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.mutable" false -// @is - "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.type" '{"inner": "str", "kind": "primitive"}' +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.lifetime" \"\'a\" +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.mutable" false +// @is "$.index[*][?(@.name=='longest')].inner.decl.inputs[1][1].inner.type" '{"inner": "str", "kind": "primitive"}' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.output.kind" '"borrowed_ref"' -// @is - "$.index[*][?(@.name=='longest')].inner.decl.output.inner.lifetime" \"\'a\" -// @is - "$.index[*][?(@.name=='longest')].inner.decl.output.inner.mutable" false -// @is - "$.index[*][?(@.name=='longest')].inner.decl.output.inner.type" '{"inner": "str", "kind": "primitive"}' +// @is "$.index[*][?(@.name=='longest')].inner.decl.output.kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='longest')].inner.decl.output.inner.lifetime" \"\'a\" +// @is "$.index[*][?(@.name=='longest')].inner.decl.output.inner.mutable" false +// @is "$.index[*][?(@.name=='longest')].inner.decl.output.inner.type" '{"inner": "str", "kind": "primitive"}' pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str { if l.len() > r.len() { l } else { r } diff --git a/src/test/rustdoc-json/lifetime/outlives.rs b/src/test/rustdoc-json/lifetime/outlives.rs index 096dd7f7a..e15a533ef 100644 --- a/src/test/rustdoc-json/lifetime/outlives.rs +++ b/src/test/rustdoc-json/lifetime/outlives.rs @@ -3,21 +3,21 @@ #![feature(no_core)] #![no_core] -// @count outlives.json "$.index[*][?(@.name=='foo')].inner.generics.params[*]" 3 -// @is - "$.index[*][?(@.name=='foo')].inner.generics.where_predicates" [] -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[0].name" \"\'a\" -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[1].name" \"\'b\" -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[2].name" '"T"' -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[0].kind.lifetime.outlives" [] -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[1].kind.lifetime.outlives" [\"\'a\"] -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.default" null -// @count - "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.bounds[*]" 1 -// @is - "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.bounds[0].outlives" \"\'b\" -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].kind" '"borrowed_ref"' -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.lifetime" \"\'a\" -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.mutable" false -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.kind" '"borrowed_ref"' -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.lifetime" \"\'b\" -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.mutable" false -// @is - "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.type" '{"inner": "T", "kind": "generic"}' +// @count "$.index[*][?(@.name=='foo')].inner.generics.params[*]" 3 +// @is "$.index[*][?(@.name=='foo')].inner.generics.where_predicates" [] +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[0].name" \"\'a\" +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[1].name" \"\'b\" +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[2].name" '"T"' +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[0].kind.lifetime.outlives" [] +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[1].kind.lifetime.outlives" [\"\'a\"] +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.default" null +// @count "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.bounds[*]" 1 +// @is "$.index[*][?(@.name=='foo')].inner.generics.params[2].kind.type.bounds[0].outlives" \"\'b\" +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.lifetime" \"\'a\" +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.mutable" false +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.kind" '"borrowed_ref"' +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.lifetime" \"\'b\" +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.mutable" false +// @is "$.index[*][?(@.name=='foo')].inner.decl.inputs[0][1].inner.type.inner.type" '{"inner": "T", "kind": "generic"}' pub fn foo<'a, 'b: 'a, T: 'b>(_: &'a &'b T) {} |