diff options
| author | Nikita Popov <npopov@redhat.com> | 2025-08-11 17:18:23 +0200 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2025-08-20 19:08:16 +0200 |
| commit | d71ed8d19bcfdbd6eb3bf2620071f2ab95470a57 (patch) | |
| tree | e741340c424decbc74d41bf783747f1440e4ca10 /tests/codegen-llvm/range-attribute.rs | |
| parent | 8365fcb2b840c95eeb0bc377af8bd498fad22245 (diff) | |
| download | rust-d71ed8d19bcfdbd6eb3bf2620071f2ab95470a57.tar.gz rust-d71ed8d19bcfdbd6eb3bf2620071f2ab95470a57.zip | |
Tell LLVM about read-only captures
`&Freeze` parameters are not only `readonly` within the function, but any captures of the pointer can also only be used for reads. This can now be encoded using the `captures(address, read_provenance)` attribute.
Diffstat (limited to 'tests/codegen-llvm/range-attribute.rs')
| -rw-r--r-- | tests/codegen-llvm/range-attribute.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/codegen-llvm/range-attribute.rs b/tests/codegen-llvm/range-attribute.rs index b81ff9ab3e2..865d36d4747 100644 --- a/tests/codegen-llvm/range-attribute.rs +++ b/tests/codegen-llvm/range-attribute.rs @@ -67,7 +67,7 @@ pub fn enum2_value(x: Enum2) -> Enum2 { x } -// CHECK: noundef [[USIZE]] @takes_slice(ptr noalias noundef nonnull readonly align 4 %x.0, [[USIZE]] noundef %x.1) +// CHECK: noundef [[USIZE]] @takes_slice(ptr {{.*}} %x.0, [[USIZE]] noundef %x.1) #[no_mangle] pub fn takes_slice(x: &[i32]) -> usize { x.len() |
