| Age | Commit message (Collapse) | Author | Lines |
|
These error messages include lines of the standard library which have
changed and so need updated.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
rename ptr::from_exposed_addr -> ptr::with_exposed_provenance
As discussed on [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/136281-t-opsem/topic/To.20expose.20or.20not.20to.20expose/near/427757066).
The old name, `from_exposed_addr`, makes little sense as it's not the address that is exposed, it's the provenance. (`ptr.expose_addr()` stays unchanged as we haven't found a better option yet. The intended interpretation is "expose the provenance and return the address".)
The new name nicely matches `ptr::without_provenance`.
|
|
|
|
|
|
|
|
|
|
relationship of Exposed Provenance and Strict Provenance
|
|
|
|
Co-authored-by: Adrian <adrian.iosdev@gmail.com>
|
|
upper-case access types
|
|
Reserved loses permissions too quickly.
Adding more fine-grained behavior of Reserved lets it lose
write permissions only temporarily.
Protected tags receive a read access on initialized locations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- reorganize tests/ structure: {stacked,tree,both}_borrows
- UnsafeCell transmutation (the one that should fail, i.e. transmute &
-> UnsafeCell then try to write)
- select TB pass tests from existing SB fail tests (and a version that
fails TB)
- many fail tests now shared
* extra test for TB that parent write invalidates child reads
* buggy_* tests now shared
* tests for deep retagging (pass_invalid_shr_*) now shared
* extra TB test that shared references are read-only
* aliasing_mut{1,2,3,4} adapted to fail both
* extra TB test that write to raw parent invalidates shared children
* mut_exclusive_violation2 now shared
* issue-miri-1050-2 revisions fix
- deduplications
|
|
|
|
|
|
Uplift `clippy::{drop,forget}_{ref,copy}` lints
This PR aims at uplifting the `clippy::drop_ref`, `clippy::drop_copy`, `clippy::forget_ref` and `clippy::forget_copy` lints.
Those lints are/were declared in the correctness category of clippy because they lint on useless and most probably is not what the developer wanted.
## `drop_ref` and `forget_ref`
The `drop_ref` and `forget_ref` lint checks for calls to `std::mem::drop` or `std::mem::forget` with a reference instead of an owned value.
### Example
```rust
let mut lock_guard = mutex.lock();
std::mem::drop(&lock_guard) // Should have been drop(lock_guard), mutex
// still locked
operation_that_requires_mutex_to_be_unlocked();
```
### Explanation
Calling `drop` or `forget` on a reference will only drop the reference itself, which is a no-op. It will not call the `drop` or `forget` method on the underlying referenced value, which is likely what was intended.
## `drop_copy` and `forget_copy`
The `drop_copy` and `forget_copy` lint checks for calls to `std::mem::forget` or `std::mem::drop` with a value that derives the Copy trait.
### Example
```rust
let x: i32 = 42; // i32 implements Copy
std::mem::forget(x) // A copy of x is passed to the function, leaving the
// original unaffected
```
### Explanation
Calling `std::mem::forget` [does nothing for types that implement Copy](https://doc.rust-lang.org/std/mem/fn.drop.html) since the value will be copied and moved into the function on invocation.
-----
Followed the instructions for uplift a clippy describe here: https://github.com/rust-lang/rust/pull/99696#pullrequestreview-1134072751
cc `@m-ou-se` (as T-libs-api leader because the uplifting was discussed in a recent meeting)
|
|
|
|
Also stops using github actions groups that conflict with our groups as github does not nest them
|
|
* additional
* addresses
* aggregates
* always
* around
* beginning
* behaviours
* borrows
* called
* canary
* deallocated
* determine
* division
* documentation
* empty
* endianness
* ensures
* existing
* github
* hygiene
* individual
* initialize
* instantiate
* library
* location
* miscellaneous
* mitigates
* needs
* nonexistent
* occurred
* occurring
* overridden
* parameter
* performable
* previous
* referential
* requires
* resolved
* scenarios
* semantics
* spurious
* structure
* subtracting
* suppress
* synchronization
* this
* timestamp
* to
* transferring
* unknown
* variable
* windows
Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
|
|
|
|
See https://github.com/rust-lang/unsafe-code-guidelines/issues/381 for discussion.
|
|
|
|
|
|
|
|
sees them
|
|
|
|
|
|
|
|
|
|
|
|
|