Add unsafe checks
- [x] Dereferencing raw pointers #1410
- [x] Calls to unsafe functions #1427
- [x] #1569
- [x] Use of mutable static #1417
- [x] Use of extern static #1417
- [x] Access to a union's field #1416
- [x] Call to functions with
#[target(feature)]attribute - [ ] Initializing type with
rustc_layout_scalar_valid_rangeattribute - [ ] Mutation of layout constrained field
- [ ] Borrow of layout constrained field
I believe the last two are related to the Freeze lang item which we do not support yet.
From @bjorn3:
- [ ] Borrow of a packed struct's field (currently back compat lint in rustc, will be a hard error in the future)
Mutation of layout constrained field
What do you mean with a layout constrained field? A field of a packed struct? Or a field of a type with the rustc_layout_scalar_valid_range_start or rustc_layout_scalar_valid_range_end attributes? Neither is related to Freeze.
Mutation of layout constrained field
What do you mean with a layout constrained field? A field of a packed struct? Or a field of a type with the
rustc_layout_scalar_valid_range_startorrustc_layout_scalar_valid_range_endattributes? Neither is related toFreeze.
I'm referring to these two unsafe operations which seems to be triggered only in some cases like this one
I didn't look much into it, I had just read your comment on #182 and assumed this had to do with Freeze. I might be completely off the mark, sorry about that.
I'm referring to these two unsafe operations which seems to be triggered only in some cases like this one
I see. In that case I have another item to add to the list:
- [ ] Borrow of a packed struct's field (currently back compat lint in rustc, will be a hard error in the future)
Thank you! Adding it to the list to make sure I don't miss it