Skip to content

Commit c7a0411

Browse files
authored
Merge pull request #20892 from hvitved/rust/builtin-mut-placeholders
Rust: Add placeholder declarations for `&mut` and `*mut`
2 parents b1ed72d + 17e1e17 commit c7a0411

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rust/ql/test/library-tests/elements/builtintypes/BuiltinTypes.expected

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
| struct Array | |
22
| struct Ptr | |
3+
| struct PtrMut | |
34
| struct Ref | |
5+
| struct RefMut | |
46
| struct Slice | |
57
| struct Tuple0 | |
68
| struct Tuple1 | |

rust/tools/builtins/types.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,10 @@ pub struct f64;
2626

2727
struct Slice<TSlice>;
2828
struct Array<TArray, const N: usize>;
29-
struct Ref<TRef>; // todo: add mut variant
30-
struct Ptr<TPtr>; // todo: add mut variant
29+
struct Ref<TRef>;
30+
struct RefMut<TRefMut>;
31+
struct Ptr<TPtr>;
32+
struct PtrMut<TPtrMut>;
3133

3234
// tuples
3335
struct Tuple0;

0 commit comments

Comments
 (0)