Skip to content

Commit

Permalink
Rollup merge of rust-lang#137540 - yotamofek:pr/more-deprecated-test-…
Browse files Browse the repository at this point in the history
…directives, r=notriddle

Fix (more) test directives that were accidentally ignored

Continuation of rust-lang#137099 , caught by rust-lang#137103 (and needed to unblock that one).
These test directives were accidentally using the old (`// ``@`)`` syntax
  • Loading branch information
jieyouxu authored Feb 28, 2025
2 parents 04888af + 0881dba commit 32feb71
Show file tree
Hide file tree
Showing 14 changed files with 24 additions and 26 deletions.
8 changes: 4 additions & 4 deletions tests/run-make/rustdoc-scrape-examples-macros/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// Scraped example should only include line numbers for items b and c in ex.rs
// @!has foobar/fn.f.html '//*[@class="src-line-numbers"]' '14'
// @has foobar/fn.f.html '//*[@class="src-line-numbers"]' '15'
// @has foobar/fn.f.html '//*[@class="src-line-numbers"]' '21'
// @!has foobar/fn.f.html '//*[@class="src-line-numbers"]' '22'
//@ !has foobar/fn.f.html '//span[@data-nosnippet]' '14'
//@ has foobar/fn.f.html '//span[@data-nosnippet]' '15'
//@ has foobar/fn.f.html '//span[@data-nosnippet]' '21'
//@ !has foobar/fn.f.html '//span[@data-nosnippet]' '22'

pub fn f() {}

Expand Down
7 changes: 3 additions & 4 deletions tests/run-make/rustdoc-scrape-examples-multiple/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//*[@class="prev"]' ''
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
// @has src/ex/ex.rs.html
// @has foobar/fn.ok.html '//a[@href="../src/ex/ex.rs.html#2"]' ''
//@ has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' ''
//@ has src/ex/ex.rs.html
//@ has foobar/fn.ok.html '//a[@href="../src/ex/ex.rs.html#2"]' ''

pub fn ok() {}
8 changes: 4 additions & 4 deletions tests/run-make/rustdoc-scrape-examples-ordering/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2'
// @has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1'
// @has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok'
// @has foobar/fn.ok.html '//*[@class="highlight"]' 'ok'
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' 'ex2'
//@ has foobar/fn.ok.html '//*[@class="more-scraped-examples"]' 'ex1'
//@ has foobar/fn.ok.html '//*[@class="highlight focus"]' 'ok'
//@ has foobar/fn.ok.html '//*[@class="highlight"]' 'ok'

pub fn ok(_x: i32) {}
4 changes: 2 additions & 2 deletions tests/run-make/rustdoc-scrape-examples-remap/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @has foobar/b/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
// @has foobar/c/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
//@ has foobar/b/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'
//@ has foobar/c/fn.foo.html '//*[@class="scraped-example expanded"]' 'ex.rs'

#[path = "a.rs"]
pub mod b;
Expand Down
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-scrape-examples-test/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' ''
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]' ''

pub fn ok() {}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//code' ' '
//@ has foobar/fn.ok.html '//*[@class="docblock scraped-example-list"]//code' ' '

pub fn ok() {}
6 changes: 3 additions & 3 deletions tests/run-make/rustdoc-themes/foo.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @has test.css
// @has foo/struct.Foo.html
// @has - '//*[@name="rustdoc-vars"]/@data-themes' 'test'
//@ has test.css
//@ has foo/struct.Foo.html
//@ has - '//*[@name="rustdoc-vars"]/@data-themes' 'test'
pub struct Foo;
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-with-out-dir-option/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @has foobar/fn.ok.html
//@ has foobar/fn.ok.html
pub fn ok() {}
2 changes: 1 addition & 1 deletion tests/run-make/rustdoc-with-output-option/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @has foobar/fn.ok.html
//@ has foobar/fn.ok.html
pub fn ok() {}
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
// @has foobar/fn.ok.html
//@ has foobar/fn.ok.html
pub fn ok() {}
3 changes: 0 additions & 3 deletions tests/rustdoc-ui/unused-extern-crate.rs

This file was deleted.

File renamed without changes.
2 changes: 2 additions & 0 deletions tests/rustdoc/unused-extern-crate.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//@ aux-crate:panic_item=panic-item.rs
//@ has unused_extern_crate/index.html
2 changes: 1 addition & 1 deletion tests/ui/inline-const/collect-scopes-in-pat.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @compile-flags: -Zlint-mir
//@ compile-flags: -Zlint-mir
//@ check-pass

#![feature(inline_const_pat)]
Expand Down

0 comments on commit 32feb71

Please sign in to comment.