summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDylan DPC <99973273+Dylan-DPC@users.noreply.github.com>2023-05-17 11:13:58 +0530
committerGitHub <noreply@github.com>2023-05-17 11:13:58 +0530
commit072074383627a6e5eb43c72522ae09010eb218c0 (patch)
tree8e9787b2c247c16a69503c34c9b7953739d09aec /tests
parent71fdb95272ba1155cb0eacd7053d0eec18f1dab1 (diff)
parent35cf5726e3a7a16d97243bc6c23ff8173e2119de (diff)
downloadrust-072074383627a6e5eb43c72522ae09010eb218c0.tar.gz
Rollup merge of #111661 - clubby789:offset-of-erase-regions, r=compiler-errors
Erase regions of type in `offset_of!` Fixes #111657
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/offset-of/offset-of-arg-count.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/ui/offset-of/offset-of-arg-count.rs b/tests/ui/offset-of/offset-of-arg-count.rs
index 5e66e33f8a2..92a205f14d9 100644
--- a/tests/ui/offset-of/offset-of-arg-count.rs
+++ b/tests/ui/offset-of/offset-of-arg-count.rs
@@ -12,6 +12,11 @@ fn main() {
offset_of!(S, f.,); //~ ERROR expected identifier
offset_of!(S, f..); //~ ERROR no rules expected the token
offset_of!(S, f..,); //~ ERROR no rules expected the token
+ offset_of!(Lt<'static>, bar); // issue #111657
+
}
struct S { f: u8, }
+struct Lt<'a> {
+ bar: &'a (),
+}