Remove unnecessary stat64 pointer casts
In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`. That
will be fixed by #51785, but let's remove the unnecessary casts here
too.
Update broken rustc-guide links
Recently, there has been some rearrangement of the content in the Rustc
Guide, and this commit changes the urls the match the updated guide.
New safe associated functions for PinMut
- Add safe `get_mut` and `map`
- Rename unsafe equivalents to `get_mut_unchecked` and `map_unchecked`
The discussion about this starts [in this comment](https://github.com/rust-lang/rust/issues/49150#issuecomment-399604573) on the tracking issue.
Link panic and compile_error docs
This adds documentation links between `panic!()` and `compile_error!()` as per #47275, which points out that they’re similar. It also adds a sentence to the `compile_error()` docs I thought could be added.
Obligation forest cleanup
While looking at this code I was scratching my head about whether a node could appear in both `parent` and `dependents`. Turns out it can, but it's not useful to do so, so this PR cleans things up so it's no longer possible.
Fix possibly endless loop in ReadDir iterator
Certain directories in `/proc` can cause the `ReadDir` iterator to loop indefinitely. We get an error code (22) when calling libc's `readdir_r` on these directories, but `entry_ptr` is `NULL` at the same time, signalling the end of the directory stream.
This change introduces an internal state to the iterator such that the `Some(Err(..))` value will only be returned once when calling `next`. Subsequent calls will return `None`.
fixes#50619
`Self` in where clauses may not be object safe
Needs crater, virtually certain to cause regressions.
In #50781 it was discovered that our object safety rules are not sound because we allow `Self` in where clauses without restrain. This PR is a direct fix to the rules so that we disallow methods with unsound where clauses.
This currently uses hard error to measure impact, but we will want to downgrade it to a future compat error.
Part of #50781.
r? @nikomatsakis
None of the tools in the list should need LLVM tools themselves as far as I can
tell; if this is incorrect, we can re-enable the tool building later.
The primary reason for doing this is that rust-central-station uses the
BuildManifest tool and building LLVM there is not cached: it takes ~1.5
hours on the 2 core machine. This commit should make nightlies and
stable releases much faster.
In effect, these just casted `&mut stat64` to `*mut stat64`, twice.
That's harmless, but it masked a problem when this was copied to new
code calling `fstatat`, which takes a pointer to `struct stat`. That
will be fixed by #51785, but let's remove the unnecessary casts here
too.