diff options
author | Liam Naddell <liam.naddell@mail.utoronto.ca> | 2024-07-06 20:34:28 -0400 |
---|---|---|
committer | P-E-P <32375388+P-E-P@users.noreply.github.com> | 2024-07-25 09:04:43 +0000 |
commit | a218b0335d1a453f4449bac8b8765258c30ea505 (patch) | |
tree | d9e04fb330c43c54ad782b1754eb5022100a63bb /gcc/rust/hir/rust-hir-dump.cc | |
parent | 47c947cfd91b1ea61766b2b0039a26da2b04d518 (diff) | |
download | gcc-a218b0335d1a453f4449bac8b8765258c30ea505.zip gcc-a218b0335d1a453f4449bac8b8765258c30ea505.tar.gz gcc-a218b0335d1a453f4449bac8b8765258c30ea505.tar.bz2 |
[#3045] #[may_dangle] in safe impl
gcc/rust/ChangeLog:
* ast/rust-ast.cc:
Fix Attribute constructors to copy inner_attribute
* checks/errors/rust-unsafe-checker.cc:
Add pass for #[may_dangle] in safe impl's
* hir/rust-ast-lower-item.cc:
Add support for unsafe impl's
* hir/rust-ast-lower-type.cc:
Lower attributes in impl's from AST to HIR
* hir/rust-hir-dump.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir-item.h:
Add unsafe support to Impl blocks in HIR
* hir/tree/rust-hir.cc:
Change single attribute to AttrVec
* hir/tree/rust-hir.h:
Add has/get_outer_attribute to GenericParam
gcc/testsuite/ChangeLog:
* rust/compile/issue-3045-1.rs:
Add test for #[may_dangle] Generic Type triggering error
* rust/compile/issue-3045-2.rs:
Add test for #[may_dangle] Lifetime triggering error
Signed-off-by: Liam Naddell <liam.naddell@mail.utoronto.ca>
Diffstat (limited to 'gcc/rust/hir/rust-hir-dump.cc')
-rw-r--r-- | gcc/rust/hir/rust-hir-dump.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/hir/rust-hir-dump.cc b/gcc/rust/hir/rust-hir-dump.cc index 57500e4..d9e02f5 100644 --- a/gcc/rust/hir/rust-hir-dump.cc +++ b/gcc/rust/hir/rust-hir-dump.cc @@ -1508,7 +1508,8 @@ void Dump::visit (TypeParam &e) { begin ("TypeParam"); - put_field ("outer_attr", e.get_outer_attribute ().as_string ()); + auto &outer_attrs = e.get_outer_attrs (); + do_outer_attrs (outer_attrs); put_field ("type_representation", e.get_type_representation ().as_string ()); |