diff options
Diffstat (limited to 'tests')
4 files changed, 33 insertions, 5 deletions
diff --git a/tests/codegen/intrinsics/aggregate-thin-pointer.rs b/tests/codegen/intrinsics/aggregate-thin-pointer.rs new file mode 100644 index 00000000000..aa3bf7e8b14 --- /dev/null +++ b/tests/codegen/intrinsics/aggregate-thin-pointer.rs @@ -0,0 +1,23 @@ +//@ compile-flags: -O -C no-prepopulate-passes -Z mir-enable-passes=-InstSimplify +//@ only-64bit (so I don't need to worry about usize) + +#![crate_type = "lib"] +#![feature(core_intrinsics)] + +use std::intrinsics::aggregate_raw_ptr; + +// InstSimplify replaces these with casts if it can, which means they're almost +// never seen in codegen, but PR#121571 found a way, so add a test for it. + +#[inline(never)] +pub fn opaque(_p: &*const i32) {} + +// CHECK-LABEL: @thin_ptr_via_aggregate( +#[no_mangle] +pub unsafe fn thin_ptr_via_aggregate(p: *const ()) { + // CHECK: %mem = alloca + // CHECK: store ptr %p, ptr %mem + // CHECK: call {{.+}}aggregate_thin_pointer{{.+}} %mem) + let mem = aggregate_raw_ptr(p, ()); + opaque(&mem); +} diff --git a/tests/run-make/rustdoc-scrape-examples-invalid-expr/Makefile b/tests/run-make/rustdoc-scrape-examples-invalid-expr/Makefile deleted file mode 100644 index 7786ff762cb..00000000000 --- a/tests/run-make/rustdoc-scrape-examples-invalid-expr/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -deps := ex - -include ../rustdoc-scrape-examples-multiple/scrape.mk - -all: scrape diff --git a/tests/run-make/rustdoc-scrape-examples-invalid-expr/rmake.rs b/tests/run-make/rustdoc-scrape-examples-invalid-expr/rmake.rs new file mode 100644 index 00000000000..537d3e2d724 --- /dev/null +++ b/tests/run-make/rustdoc-scrape-examples-invalid-expr/rmake.rs @@ -0,0 +1,6 @@ +#[path = "../rustdoc-scrape-examples-remap/scrape.rs"] +mod scrape; + +fn main() { + scrape::scrape(); +} diff --git a/tests/ui/suggestions/recover-from-semicolon-trailing-item.stderr b/tests/ui/suggestions/recover-from-semicolon-trailing-item.stderr index fee83eb5c18..e068fdb5aba 100644 --- a/tests/ui/suggestions/recover-from-semicolon-trailing-item.stderr +++ b/tests/ui/suggestions/recover-from-semicolon-trailing-item.stderr @@ -3,6 +3,8 @@ error: expected item, found `;` | LL | mod M {}; | ^ help: remove this semicolon + | + = help: module declarations are not followed by a semicolon error: expected item, found `;` --> $DIR/recover-from-semicolon-trailing-item.rs:4:12 @@ -17,6 +19,8 @@ error: expected item, found `;` | LL | fn foo(a: usize) {}; | ^ help: remove this semicolon + | + = help: function declarations are not followed by a semicolon error[E0308]: mismatched types --> $DIR/recover-from-semicolon-trailing-item.rs:10:20 |
