diff options
| author | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-04-20 23:54:50 -0500 |
|---|---|---|
| committer | carbotaniuman <41451839+carbotaniuman@users.noreply.github.com> | 2024-06-06 20:26:27 -0500 |
| commit | 67f5dd1ef112c8a87bc3353793cf4c1cece10c2d (patch) | |
| tree | afbeed6330ff7adea5d84a5ecf17dc3d1d3601b8 /compiler/rustc_expand/src/build.rs | |
| parent | 76e7a0849c07d73e4d9afde8036ee8c450127cc8 (diff) | |
| download | rust-67f5dd1ef112c8a87bc3353793cf4c1cece10c2d.tar.gz rust-67f5dd1ef112c8a87bc3353793cf4c1cece10c2d.zip | |
Parse unsafe attributes
Diffstat (limited to 'compiler/rustc_expand/src/build.rs')
| -rw-r--r-- | compiler/rustc_expand/src/build.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs index b3d41908260..9451102c010 100644 --- a/compiler/rustc_expand/src/build.rs +++ b/compiler/rustc_expand/src/build.rs @@ -666,7 +666,7 @@ impl<'a> ExtCtxt<'a> { // Builds `#[name]`. pub fn attr_word(&self, name: Symbol, span: Span) -> ast::Attribute { let g = &self.sess.psess.attr_id_generator; - attr::mk_attr_word(g, ast::AttrStyle::Outer, name, span) + attr::mk_attr_word(g, ast::AttrStyle::Outer, ast::Unsafe::No, name, span) } // Builds `#[name = val]`. @@ -674,12 +674,12 @@ impl<'a> ExtCtxt<'a> { // Note: `span` is used for both the identifier and the value. pub fn attr_name_value_str(&self, name: Symbol, val: Symbol, span: Span) -> ast::Attribute { let g = &self.sess.psess.attr_id_generator; - attr::mk_attr_name_value_str(g, ast::AttrStyle::Outer, name, val, span) + attr::mk_attr_name_value_str(g, ast::AttrStyle::Outer, ast::Unsafe::No, name, val, span) } // Builds `#[outer(inner)]`. pub fn attr_nested_word(&self, outer: Symbol, inner: Symbol, span: Span) -> ast::Attribute { let g = &self.sess.psess.attr_id_generator; - attr::mk_attr_nested_word(g, ast::AttrStyle::Outer, outer, inner, span) + attr::mk_attr_nested_word(g, ast::AttrStyle::Outer, ast::Unsafe::No, outer, inner, span) } } |
