mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-19 11:12:43 +00:00
make noalias-box-off filecheck more precise
The CHECK, -NOT, -SAME pattern ensures that the `CHECK-NOT: noalias` is limited to only one line, and won't match unrelated lines further down in the file. Explicit drop call added to preserve the `foo` argument name, since names of unused arguments are not preserved.
This commit is contained in:
parent
644818351b
commit
c4d69b717f
@ -3,6 +3,9 @@
|
||||
#![crate_type = "lib"]
|
||||
|
||||
// CHECK-LABEL: @box_should_not_have_noalias_if_disabled(
|
||||
// CHECK-NOT: noalias{{.*}}%
|
||||
// CHECK-NOT: noalias
|
||||
// CHECK-SAME: %foo)
|
||||
#[no_mangle]
|
||||
pub fn box_should_not_have_noalias_if_disabled(_b: Box<u8>) {}
|
||||
pub fn box_should_not_have_noalias_if_disabled(foo: Box<u8>) {
|
||||
drop(foo);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user