Tweak obligation error output
- Point at arguments or output when fn obligations come from them, or ident when they don't
- Point at `Sized` bound (fix#47990)
- When object unsafe trait uses itself in associated item suggest using `Self` (fix#66424, fix#33375, partially address #38376, cc #61525)
- Point at reason in object unsafe trait with `Self` in supertraits or `where`-clause (cc #40533, cc #68377)
- On implicit type parameter `Sized` obligations, suggest `?Sized` (fix#57744, fix#46683)
Updated tracking issue number
Added safeguards for transmute_vec potentially being factored out elsewhere
Clarified comment about avoiding mem::forget
Removed unneeded unstable guard
Added back a stability annotation for CI
Minor documentation improvements
Thanks to @Centril's code review
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Improved layout checks, type annotations and removed unaccurate comment
Removed unnecessary check on array layout
Adapt the stability annotation to the new 1.41 milestone
Co-Authored-By: Mazdak Farrokhzad <twingoow@gmail.com>
Simplify the implementation.
Use `Vec::into_raw_parts` instead of a manual implementation of
`Vec::transmute`.
If `Vec::into_raw_parts` uses `NonNull` instead, then the code here
will need to be adjusted to take it into account (issue #65816)
Reduce the whitespace of safety comments
Step stage0 to bootstrap from 1.42
This also includes a commit which fixes the rustfmt downloading logic to redownload when the rustfmt channel changes, and bumps rustfmt to a more recent version.
Always use lazy qualif getters during const-checking
`has_mut_interior_eager_seek` was needed to work around an overly restrictive bound on the `per_local` argument to the `Qualif` trait. This PR makes that bound `FnMut` instead of `Fn` so we can seek cursors inside of it, resolving a FIXME in the const-checking code.
librustc: don't clone a type that is copy
librustc_incremental: use faster vector initialization
librustc_typeck: don't clone a type that is copy
librustdoc: don't create a vector where a slice will do
Implement MIR lowering for or-patterns
This is the last thing needed to get meaningful run-pass tests for or-patterns. There probably need to be more tests before stabilizing this, but the most important cases should have been covered.
Note: we can generate exponentially large MIR CFGs when using or-patterns containing bindings, type ascriptions, or that are for a match arm with a guard. `src/test/mir-opt/exponential-or.rs` shows the best case for what we currently do.
cc #54883closes#60350closes#67514
cc @Centril
r? @pnkfelix
Added upper bound of what vecs and boxes can allocate
Fixed issue #68593
I added a line of documentation to these two files to reflect that vectors and boxes ensure that they never allocate more than `isize::MAX` bytes.
r? @steveklabnik
Install robots.txt into rust-docs tarballs
Fixes#68677.
I believe this might just work out from the central-station perspective, but even if it doesn't, this is a prerequisite step anyway.