summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-json/lifetime
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:42 +0000
commitcec1877e180393eba0f6ddb0cf97bf3a791631c7 (patch)
tree47b4dac2a9dd9a40c30c251b4d4a72d7ccf77e9f /tests/rustdoc-json/lifetime
parentAdding debian version 1.74.1+dfsg1-1. (diff)
downloadrustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.tar.xz
rustc-cec1877e180393eba0f6ddb0cf97bf3a791631c7.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/rustdoc-json/lifetime')
-rw-r--r--tests/rustdoc-json/lifetime/longest.rs9
-rw-r--r--tests/rustdoc-json/lifetime/outlives.rs3
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs
index dc28258a8..419b0b4fc 100644
--- a/tests/rustdoc-json/lifetime/longest.rs
+++ b/tests/rustdoc-json/lifetime/longest.rs
@@ -1,8 +1,5 @@
// ignore-tidy-linelength
-#![feature(no_core)]
-#![no_core]
-
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].name" \"\'a\"
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
// @is "$.index[*][?(@.name=='longest')].inner.function.generics.params[0].kind" '{"lifetime": {"outlives": []}}'
@@ -26,5 +23,9 @@
// @is "$.index[*][?(@.name=='longest')].inner.function.decl.output.borrowed_ref.type.primitive" \"str\"
pub fn longest<'a>(l: &'a str, r: &'a str) -> &'a str {
- if l.len() > r.len() { l } else { r }
+ if l.len() > r.len() {
+ l
+ } else {
+ r
+ }
}
diff --git a/tests/rustdoc-json/lifetime/outlives.rs b/tests/rustdoc-json/lifetime/outlives.rs
index 6e105b382..549e4c200 100644
--- a/tests/rustdoc-json/lifetime/outlives.rs
+++ b/tests/rustdoc-json/lifetime/outlives.rs
@@ -1,8 +1,5 @@
// ignore-tidy-linelength
-#![feature(no_core)]
-#![no_core]
-
// @count "$.index[*][?(@.name=='foo')].inner.function.generics.params[*]" 3
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.where_predicates" []
// @is "$.index[*][?(@.name=='foo')].inner.function.generics.params[0].name" \"\'a\"