Skip to content

Commit a53fb6e

Browse files
zrlkcopybara-github
authored andcommitted
Remove (trivial) lifetime_elision pragmata from goldens.
These uses of the lifetime_elision pragma don't affect generated code outside of generating diagnostic comments. PiperOrigin-RevId: 879906592
1 parent 0103613 commit a53fb6e

24 files changed

+1
-498
lines changed

rs_bindings_from_cc/test/golden/bitfields.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifndef CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_BITFIELDS_H_
66
#define CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_BITFIELDS_H_
77

8-
#pragma clang lifetime_elision
98

109
struct WithBitfields {
1110
int f1 : 2;

rs_bindings_from_cc/test/golden/bitfields_rs_api.rs

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -51,32 +51,14 @@ impl Default for WithBitfields {
5151
}
5252
}
5353

54-
// Error while generating bindings for constructor 'WithBitfields::WithBitfields':
55-
// Can't generate bindings for WithBitfields::WithBitfields, because of missing required features (crubit.rs-features):
56-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::WithBitfields (the type of __param_0 (parameter #1): references are not supported)
57-
58-
// Error while generating bindings for constructor 'WithBitfields::WithBitfields':
59-
// Can't generate bindings for WithBitfields::WithBitfields, because of missing required features (crubit.rs-features):
60-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::WithBitfields (the type of __param_0 (parameter #1): references are not supported)
61-
62-
// Error while generating bindings for function 'WithBitfields::operator=':
63-
// Can't generate bindings for WithBitfields::operator=, because of missing required features (crubit.rs-features):
64-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::operator= (return type: references are not supported)
65-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::operator= (the type of __param_0 (parameter #1): references are not supported)
66-
67-
// Error while generating bindings for function 'WithBitfields::operator=':
68-
// Can't generate bindings for WithBitfields::operator=, because of missing required features (crubit.rs-features):
69-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::operator= (return type: references are not supported)
70-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for WithBitfields::operator= (the type of __param_0 (parameter #1): references are not supported)
71-
7254
/// This is a regression test for b/283835873 where the alignment of the
7355
/// generated struct was wrong/missing.
7456
///
7557
/// # Safety
7658
///
7759
/// To call a function that accepts this type, you must uphold these requirements:
7860
/// * Document why the following public unsafe fields of this type cannot be misused by callee:
79-
/// * `status`: Rust type is unknown; safety requirements cannot be automatically generated: Unsupported type 'enum AlignmentRegressionTest::(unnamed at ./rs_bindings_from_cc/test/golden/bitfields.h:26:3)': No generated bindings found for ''
61+
/// * `status`: Rust type is unknown; safety requirements cannot be automatically generated: Unsupported type 'enum AlignmentRegressionTest::(unnamed at ./rs_bindings_from_cc/test/golden/bitfields.h:25:3)': No generated bindings found for ''
8062
#[derive(Clone, Copy, ::ctor::MoveAndAssignViaCopy)]
8163
#[repr(C, align(4))]
8264
///CRUBIT_ANNOTATE: cpp_type=AlignmentRegressionTest
@@ -103,24 +85,6 @@ impl Default for AlignmentRegressionTest {
10385
}
10486
}
10587

106-
// Error while generating bindings for constructor 'AlignmentRegressionTest::AlignmentRegressionTest':
107-
// Can't generate bindings for AlignmentRegressionTest::AlignmentRegressionTest, because of missing required features (crubit.rs-features):
108-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::AlignmentRegressionTest (the type of __param_0 (parameter #1): references are not supported)
109-
110-
// Error while generating bindings for constructor 'AlignmentRegressionTest::AlignmentRegressionTest':
111-
// Can't generate bindings for AlignmentRegressionTest::AlignmentRegressionTest, because of missing required features (crubit.rs-features):
112-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::AlignmentRegressionTest (the type of __param_0 (parameter #1): references are not supported)
113-
114-
// Error while generating bindings for function 'AlignmentRegressionTest::operator=':
115-
// Can't generate bindings for AlignmentRegressionTest::operator=, because of missing required features (crubit.rs-features):
116-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::operator= (return type: references are not supported)
117-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::operator= (the type of __param_0 (parameter #1): references are not supported)
118-
119-
// Error while generating bindings for function 'AlignmentRegressionTest::operator=':
120-
// Can't generate bindings for AlignmentRegressionTest::operator=, because of missing required features (crubit.rs-features):
121-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::operator= (return type: references are not supported)
122-
// //rs_bindings_from_cc/test/golden:bitfields_cc needs [//features:experimental] for AlignmentRegressionTest::operator= (the type of __param_0 (parameter #1): references are not supported)
123-
12488
pub mod alignment_regression_test {
12589
#[allow(unused_imports)]
12690
use super::*;

rs_bindings_from_cc/test/golden/clang_attrs.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#ifndef CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_CLANG_ATTRS_H_
66
#define CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_CLANG_ATTRS_H_
77

8-
#pragma clang lifetime_elision
98

109
struct alignas(64) HasCustomAlignment {};
1110

rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs

Lines changed: 0 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -37,24 +37,6 @@ impl Default for HasCustomAlignment {
3737
}
3838
}
3939

40-
// Error while generating bindings for constructor 'HasCustomAlignment::HasCustomAlignment':
41-
// Can't generate bindings for HasCustomAlignment::HasCustomAlignment, because of missing required features (crubit.rs-features):
42-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::HasCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
43-
44-
// Error while generating bindings for constructor 'HasCustomAlignment::HasCustomAlignment':
45-
// Can't generate bindings for HasCustomAlignment::HasCustomAlignment, because of missing required features (crubit.rs-features):
46-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::HasCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
47-
48-
// Error while generating bindings for function 'HasCustomAlignment::operator=':
49-
// Can't generate bindings for HasCustomAlignment::operator=, because of missing required features (crubit.rs-features):
50-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::operator= (return type: references are not supported)
51-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
52-
53-
// Error while generating bindings for function 'HasCustomAlignment::operator=':
54-
// Can't generate bindings for HasCustomAlignment::operator=, because of missing required features (crubit.rs-features):
55-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::operator= (return type: references are not supported)
56-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
57-
5840
#[derive(Clone, Copy, ::ctor::MoveAndAssignViaCopy)]
5941
#[repr(C)]
6042
///CRUBIT_ANNOTATE: cpp_type=HasFieldWithCustomAlignment
@@ -81,24 +63,6 @@ impl Default for HasFieldWithCustomAlignment {
8163
}
8264
}
8365

84-
// Error while generating bindings for constructor 'HasFieldWithCustomAlignment::HasFieldWithCustomAlignment':
85-
// Can't generate bindings for HasFieldWithCustomAlignment::HasFieldWithCustomAlignment, because of missing required features (crubit.rs-features):
86-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::HasFieldWithCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
87-
88-
// Error while generating bindings for constructor 'HasFieldWithCustomAlignment::HasFieldWithCustomAlignment':
89-
// Can't generate bindings for HasFieldWithCustomAlignment::HasFieldWithCustomAlignment, because of missing required features (crubit.rs-features):
90-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::HasFieldWithCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
91-
92-
// Error while generating bindings for function 'HasFieldWithCustomAlignment::operator=':
93-
// Can't generate bindings for HasFieldWithCustomAlignment::operator=, because of missing required features (crubit.rs-features):
94-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::operator= (return type: references are not supported)
95-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
96-
97-
// Error while generating bindings for function 'HasFieldWithCustomAlignment::operator=':
98-
// Can't generate bindings for HasFieldWithCustomAlignment::operator=, because of missing required features (crubit.rs-features):
99-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::operator= (return type: references are not supported)
100-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasFieldWithCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
101-
10266
#[derive(Clone, Copy, ::ctor::MoveAndAssignViaCopy)]
10367
#[repr(C, align(64))]
10468
///CRUBIT_ANNOTATE: cpp_type=InheritsFromBaseWithCustomAlignment
@@ -125,24 +89,6 @@ impl Default for InheritsFromBaseWithCustomAlignment {
12589
}
12690
}
12791

128-
// Error while generating bindings for constructor 'InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment':
129-
// Can't generate bindings for InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment, because of missing required features (crubit.rs-features):
130-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
131-
132-
// Error while generating bindings for constructor 'InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment':
133-
// Can't generate bindings for InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment, because of missing required features (crubit.rs-features):
134-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::InheritsFromBaseWithCustomAlignment (the type of __param_0 (parameter #1): references are not supported)
135-
136-
// Error while generating bindings for function 'InheritsFromBaseWithCustomAlignment::operator=':
137-
// Can't generate bindings for InheritsFromBaseWithCustomAlignment::operator=, because of missing required features (crubit.rs-features):
138-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::operator= (return type: references are not supported)
139-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
140-
141-
// Error while generating bindings for function 'InheritsFromBaseWithCustomAlignment::operator=':
142-
// Can't generate bindings for InheritsFromBaseWithCustomAlignment::operator=, because of missing required features (crubit.rs-features):
143-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::operator= (return type: references are not supported)
144-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for InheritsFromBaseWithCustomAlignment::operator= (the type of __param_0 (parameter #1): references are not supported)
145-
14692
#[derive(Clone, Copy, ::ctor::MoveAndAssignViaCopy)]
14793
#[repr(C, align(64))]
14894
///CRUBIT_ANNOTATE: cpp_type=HasCustomAlignmentWithGnuAttr
@@ -169,24 +115,6 @@ impl Default for HasCustomAlignmentWithGnuAttr {
169115
}
170116
}
171117

172-
// Error while generating bindings for constructor 'HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr':
173-
// Can't generate bindings for HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr, because of missing required features (crubit.rs-features):
174-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr (the type of __param_0 (parameter #1): references are not supported)
175-
176-
// Error while generating bindings for constructor 'HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr':
177-
// Can't generate bindings for HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr, because of missing required features (crubit.rs-features):
178-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::HasCustomAlignmentWithGnuAttr (the type of __param_0 (parameter #1): references are not supported)
179-
180-
// Error while generating bindings for function 'HasCustomAlignmentWithGnuAttr::operator=':
181-
// Can't generate bindings for HasCustomAlignmentWithGnuAttr::operator=, because of missing required features (crubit.rs-features):
182-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::operator= (return type: references are not supported)
183-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::operator= (the type of __param_0 (parameter #1): references are not supported)
184-
185-
// Error while generating bindings for function 'HasCustomAlignmentWithGnuAttr::operator=':
186-
// Can't generate bindings for HasCustomAlignmentWithGnuAttr::operator=, because of missing required features (crubit.rs-features):
187-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::operator= (return type: references are not supported)
188-
// //rs_bindings_from_cc/test/golden:clang_attrs_cc needs [//features:experimental] for HasCustomAlignmentWithGnuAttr::operator= (the type of __param_0 (parameter #1): references are not supported)
189-
190118
pub mod template_with_preferred_name { // Error while generating bindings for class 'template_with_preferred_name::SomeTemplate':
191119
// Class templates are not supported yet
192120

rs_bindings_from_cc/test/golden/comment.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
#ifndef CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_COMMENT_H_
88
#define CRUBIT_RS_BINDINGS_FROM_CC_TEST_GOLDEN_COMMENT_H_
99

10-
#pragma clang lifetime_elision
1110

1211
namespace ns {
1312
// a

0 commit comments

Comments
 (0)