summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc-json/lifetime/longest.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/rustdoc-json/lifetime/longest.rs9
1 files changed, 5 insertions, 4 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
+ }
}