diff options
| author | Alona Enraght-Moony <code@alona.page> | 2023-11-07 16:36:55 +0000 |
|---|---|---|
| committer | Alona Enraght-Moony <code@alona.page> | 2023-11-07 16:36:55 +0000 |
| commit | f784fa7bd980916c235f5bd9bdbcf9389ea261f4 (patch) | |
| tree | f892a79f309b79db1bedf09c00186f4b0953c485 /tests/rustdoc-json/lifetime | |
| parent | 187d1afa9dc17d06e65f5e817e2bd1d9ae33830a (diff) | |
| download | rust-f784fa7bd980916c235f5bd9bdbcf9389ea261f4.tar.gz rust-f784fa7bd980916c235f5bd9bdbcf9389ea261f4.zip | |
tests/rustdoc-json: Remove some needless uses of `#![no_core]`.
Done by removing all uses of `#![no_core]`, and the reverting the ones that failed. More involved ones are in a later commit.
Diffstat (limited to 'tests/rustdoc-json/lifetime')
| -rw-r--r-- | tests/rustdoc-json/lifetime/longest.rs | 9 | ||||
| -rw-r--r-- | tests/rustdoc-json/lifetime/outlives.rs | 3 |
2 files changed, 5 insertions, 7 deletions
diff --git a/tests/rustdoc-json/lifetime/longest.rs b/tests/rustdoc-json/lifetime/longest.rs index dc28258a8b6..419b0b4fcab 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 6e105b382b0..549e4c200dc 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\" |
