Skip to content

Commit 57d2ecb

Browse files
authored
Merge pull request rust-lang#305 from GuillaumeGomez/pure-attr
Add support for "pure" function attribute
2 parents ce0077c + 34922fc commit 57d2ecb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/attributes.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ pub fn from_fn_attrs<'gcc, 'tcx>(
121121
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_RETURNS_TWICE) {
122122
func.add_attribute(FnAttribute::ReturnsTwice);
123123
}
124+
if codegen_fn_attrs.flags.contains(CodegenFnAttrFlags::FFI_PURE) {
125+
func.add_attribute(FnAttribute::Pure);
126+
}
124127
}
125128

126129
let function_features =

0 commit comments

Comments
 (0)