Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bddb015

Browse filesBrowse files
authored
Rollup merge of rust-lang#140551 - mejrs:test4, r=jieyouxu
Move some tests out of tests/ui r? `@jieyouxu`
2 parents 020d908 + 9a574b0 commit bddb015
Copy full SHA for bddb015
Expand file treeCollapse file tree

33 files changed

+254
-193
lines changed

‎src/tools/tidy/src/issues.txt

Copy file name to clipboardExpand all lines: src/tools/tidy/src/issues.txt
-10Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -276,13 +276,7 @@ ui/auto-traits/issue-23080-2.rs
276276
ui/auto-traits/issue-23080.rs
277277
ui/auto-traits/issue-83857-ub.rs
278278
ui/auto-traits/issue-84075.rs
279-
ui/auxiliary/issue-13560-1.rs
280-
ui/auxiliary/issue-13560-2.rs
281-
ui/auxiliary/issue-13560-3.rs
282279
ui/auxiliary/issue-16822.rs
283-
ui/auxiliary/issue-18502.rs
284-
ui/auxiliary/issue-24106.rs
285-
ui/auxiliary/issue-76387.rs
286280
ui/bench/issue-32062.rs
287281
ui/binding/issue-40402-1.rs
288282
ui/binding/issue-40402-2.rs
@@ -1378,12 +1372,8 @@ ui/intrinsics/issue-28575.rs
13781372
ui/intrinsics/issue-84297-reifying-copy.rs
13791373
ui/invalid/issue-114435-layout-type-err.rs
13801374
ui/issue-11881.rs
1381-
ui/issue-13560.rs
13821375
ui/issue-15924.rs
13831376
ui/issue-16822.rs
1384-
ui/issue-18502.rs
1385-
ui/issue-24106.rs
1386-
ui/issue-76387-llvm-miscompile.rs
13871377
ui/issues-71798.rs
13881378
ui/issues/auxiliary/issue-11224.rs
13891379
ui/issues/auxiliary/issue-11508.rs
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
//@ no-prefer-dynamic
2-
31
#![crate_type = "dylib"]
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
//@ no-prefer-dynamic
2+
3+
#![crate_type = "rlib"]
4+
5+
#[macro_use] #[no_link] extern crate empty_crate_1 as t1;
6+
#[macro_use] extern crate empty_crate_2 as t2;
+17Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//! Regression test for #13560. Previously, it was possible to
2+
//! trigger an assert in crate numbering if a series of crates
3+
//! being loaded included a "syntax-only" extern crate.
4+
//! But it appears we don't mess with crate numbering for
5+
//! `#[no_link]` crates anymore, so this test doesn't seem
6+
//! to test anything now.
7+
8+
//@ run-pass
9+
//@ needs-crate-type: dylib
10+
//@ aux-build:empty-crate-1.rs
11+
//@ aux-build:empty-crate-2.rs
12+
//@ aux-build:no_link-crate.rs
13+
14+
extern crate empty_crate_2 as t2;
15+
extern crate no_link_crate as t3;
16+
17+
fn main() {}
+19Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
//! Unfortunately the development of `#[phase]` and `#[no_link]`
2+
//! predates Zulip, and thus has been lost in the sands of time.
3+
//! Understanding the true nature of this test has been left as
4+
//! an exercise for the reader.
5+
//!
6+
//! But we guess from the git history that originally this
7+
//! test was supposed to check that we error if we can't find
8+
//! an extern crate annotated with `#[phase(syntax)]`,
9+
//! see `macro-crate-unknown-crate.rs` in
10+
//! <https://github.com/rust-lang/rust/pull/11151>. Later, we changed
11+
//! `#[phase]` to `#![feature(plugin)]` and added a `#[no_link]`.
12+
//!
13+
//! I suppose that this now tests that we still error if we can't
14+
//! find a `#[no_link]` extern crate?
15+
16+
#[no_link]
17+
extern crate doesnt_exist; //~ ERROR can't find crate
18+
19+
fn main() {}

‎tests/ui/no-link-unknown-crate.stderr renamed to ‎tests/ui/attributes/no_link/no-link-unknown-crate.stderr

Copy file name to clipboardExpand all lines: tests/ui/attributes/no_link/no-link-unknown-crate.stderr
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0463]: can't find crate for `doesnt_exist`
2-
--> $DIR/no-link-unknown-crate.rs:2:1
2+
--> $DIR/no-link-unknown-crate.rs:17:1
33
|
44
LL | extern crate doesnt_exist;
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate

‎tests/ui/auxiliary/inner_static.rs

Copy file name to clipboardExpand all lines: tests/ui/auxiliary/inner_static.rs
-51Lines changed: 0 additions & 51 deletions
This file was deleted.

‎tests/ui/auxiliary/issue-13560-3.rs

Copy file name to clipboardExpand all lines: tests/ui/auxiliary/issue-13560-3.rs
-6Lines changed: 0 additions & 6 deletions
This file was deleted.
+12Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//! Dpn't ice on using an inlined function from another crate
2+
//! See <https://github.com/rust-lang/rust/issues/18502> and
3+
//! <https://github.com/rust-lang/rust/issues/18501>
4+
5+
//@ run-pass
6+
//@ aux-build:inline-cross-crate.rs
7+
8+
extern crate inline_cross_crate as fmt;
9+
10+
fn main() {
11+
::fmt::baz();
12+
}
+22Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//! Regression test for <https://github.com/rust-lang/rust/issues/76387>
2+
//! Tests that LLVM doesn't miscompile this
3+
//! See upstream fix: <https://reviews.llvm.org/D88529>.
4+
5+
//@ compile-flags: -C opt-level=3
6+
//@ aux-build: llvm-miscompile-MarkValue-MaybeLive.rs
7+
//@ run-pass
8+
9+
extern crate llvm_miscompile_MarkValue_MaybeLive;
10+
11+
use llvm_miscompile_MarkValue_MaybeLive::FatPtr;
12+
13+
fn print(data: &[u8]) {
14+
println!("{:#?}", data);
15+
}
16+
17+
fn main() {
18+
let ptr = FatPtr::new(20);
19+
let data = unsafe { std::slice::from_raw_parts(ptr.as_ptr(), ptr.len()) };
20+
21+
print(data);
22+
}

‎tests/ui/impl-privacy-xc-1.rs

Copy file name to clipboardExpand all lines: tests/ui/impl-privacy-xc-1.rs
-10Lines changed: 0 additions & 10 deletions
This file was deleted.

‎tests/ui/inner-static.rs

Copy file name to clipboardExpand all lines: tests/ui/inner-static.rs
-14Lines changed: 0 additions & 14 deletions
This file was deleted.

‎tests/ui/issue-13560.rs

Copy file name to clipboardExpand all lines: tests/ui/issue-13560.rs
-13Lines changed: 0 additions & 13 deletions
This file was deleted.

‎tests/ui/issue-18502.rs

Copy file name to clipboardExpand all lines: tests/ui/issue-18502.rs
-8Lines changed: 0 additions & 8 deletions
This file was deleted.

‎tests/ui/issue-24106.rs

Copy file name to clipboardExpand all lines: tests/ui/issue-24106.rs
-8Lines changed: 0 additions & 8 deletions
This file was deleted.

‎tests/ui/issue-76387-llvm-miscompile.rs

Copy file name to clipboardExpand all lines: tests/ui/issue-76387-llvm-miscompile.rs
-21Lines changed: 0 additions & 21 deletions
This file was deleted.

‎tests/ui/non-fmt-panic.fixed renamed to ‎tests/ui/macros/non-fmt-panic.fixed

Copy file name to clipboardExpand all lines: tests/ui/macros/non-fmt-panic.fixed
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//! The non_fmt_panics lint detects panic!(..) invocations where
2+
//! the first argument is not a formatting string.
3+
//!
4+
//! Also, this test checks that this is not emitted if it originates
5+
//! in an external macro.
6+
17
//@ run-rustfix
28
//@ rustfix-only-machine-applicable
39
//@ build-pass (FIXME(62277): should be check-pass)

‎tests/ui/non-fmt-panic.rs renamed to ‎tests/ui/macros/non-fmt-panic.rs

Copy file name to clipboardExpand all lines: tests/ui/macros/non-fmt-panic.rs
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
//! The non_fmt_panics lint detects panic!(..) invocations where
2+
//! the first argument is not a formatting string.
3+
//!
4+
//! Also, this test checks that this is not emitted if it originates
5+
//! in an external macro.
6+
17
//@ run-rustfix
28
//@ rustfix-only-machine-applicable
39
//@ build-pass (FIXME(62277): should be check-pass)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.