| Age | Commit message (Collapse) | Author | Lines |
|
revert const_type_id stabilization
This reverts #72488, which is currently on beta and scheduled to stabilize in `1.47.0`, based on https://github.com/rust-lang/rust/pull/75923#issuecomment-696676511
It turns out we might not be quite ready to stabilize `TypeId` in const contexts before having a chance to rework its internals. Since `TypeId` is a bit of an oddity we want to be careful about how those internals are currently being relied on while making changes. That will be easier to do without having to also consider compile-time contexts.
r? `@eddyb`
|
|
Rollup of 9 pull requests
Successful merges:
- #76898 (Record `tcx.def_span` instead of `item.span` in crate metadata)
- #76939 (emit errors during AbstractConst building)
- #76965 (Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut.)
- #76993 (Changing the alloc() to accept &self instead of &mut self)
- #76994 (fix small typo in docs and comments)
- #77017 (Add missing examples on Vec iter types)
- #77042 (Improve documentation for ToSocketAddrs)
- #77047 (Miri: more informative deallocation error messages)
- #77055 (Add #[track_caller] to more panicking Cell functions)
Failed merges:
r? `@ghost`
|
|
MIR pass to remove unneeded drops on types not needing drop
This is heavily dependent on MIR inlining running to actually see the drop statement.
Do we want to special case replacing a call to std::mem::drop with a goto aswell?
|
|
|
|
Changing the alloc() to accept &self instead of &mut self
Fixes: [#55](https://github.com/rust-lang/wg-allocators/issues/55)
This is the first cut. It only makes the change for `alloc` method.
|
|
Add cfg(target_has_atomic_equal_alignment) and use it for Atomic::from_mut.
Fixes some platform-specific problems with #74532 by using the actual alignment of the types instead of hardcoding a few `target_arch`s.
r? @RalfJung
|
|
emit errors during AbstractConst building
There changes are currently still untested, so I don't expect this to pass CI :laughing:
It seems to me like this is the direction we want to go in, though we didn't have too much of a discussion about this.
r? @oli-obk
|
|
Record `tcx.def_span` instead of `item.span` in crate metadata
This was missed in PR #75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
|
|
SimplifyComparisonIntegral: fix miscompilation
Fixes #76432
Only insert StorageDeads if we actually removed one.
Fixes an issue where we added StorageDead to a place with no StorageLive
r? `@oli-obk`
|
|
|
|
|
|
This reverts commit e3856616ee2a894c7811a7017d98fafa7ba84dd8.
|
|
|
|
|
|
This is heavily dependent on MIR inlining running to actually see the drop statement
|
|
|
|
|
|
|
|
lint missing docs for extern items
fixes #76991
|
|
extend `Ty` and `TyCtxt` lints to self types
blocked on #76891
r? @ecstatic-morse cc @Aaron1011
|
|
Use const-checking to forbid use of unstable features in const-stable functions
First step towards #76618.
Currently this code isn't ever hit because `qualify_min_const_fn` runs first and catches pretty much everything. One exception is `const_precise_live_drops`, which does not use the newly added code since it runs as part of a separate pass.
Also contains some unrelated refactoring, which is split into separate commits.
r? @oli-obk
|
|
do not ICE on bound variables, return `TooGeneric` instead
fixes #73260, fixes #74634, fixes #76595
r? @nikomatsakis
|
|
Add explanation for E0756
r? @pickfire
|
|
|
|
|
|
|
|
This makes the test run deterministic regardless of noopt testruns
|
|
|
|
|
|
|
|
|
|
This was missed in PR #75465. As a result, a few places have been using
the full body span of functions, instead of just the header span.
|
|
|
|
|
|
|
|
|
|
Rollup of 10 pull requests
Successful merges:
- #76439 (Add error explanation for E0755)
- #76521 (Fix segfault if pthread_getattr_np fails)
- #76835 (make replace_prefix only take &str as arguments )
- #76967 (Revert adding Atomic::from_mut.)
- #76977 (Add a regression test for copy propagation miscompilation)
- #76981 (liballoc bench use imported path Bencher)
- #76983 (BTreeMap: extra testing & fixed comments)
- #76996 (Fix typo in rustc_lexer docs)
- #77009 (Dogfood total_cmp in the test crate)
- #77012 (update Miri for another bugfix)
Failed merges:
- #76489 (Add explanation for E0756)
r? `@ghost`
|
|
Add a regression test for copy propagation miscompilation
|
|
r=pickfire,jyn514
Add error explanation for E0755
r? @pickfire
|
|
fix unification of const variables
r? `@nikomatsakis` `@varkor` `@eddyb` let's just ping everyone here :sweat_smile:
|
|
|
|
Rollup of 13 pull requests
Successful merges:
- #76135 (Stabilize some Option methods as const)
- #76628 (Add sample defaults for config.toml )
- #76846 (Avoiding unnecesary allocations at rustc_errors)
- #76867 (Use intra-doc links in core/src/iter when possible)
- #76868 (Finish moving to intra doc links for std::sync)
- #76872 (Remove DeclareMethods)
- #76936 (Add non-`unsafe` `.get_mut()` for `Unsafecell`)
- #76958 (Replace manual as_nanos and as_secs_f64 reimplementations)
- #76959 (Replace write_fmt with write!)
- #76961 (Add test for issue #34634)
- #76962 (Use const_cstr macro in consts.rs)
- #76963 (Remove unused static_assert macro)
- #77000 (update Miri)
Failed merges:
r? `@ghost`
|
|
Add test for issue #34634
Closes #34634
|
|
Stabilize some Option methods as const
Stabilize the following methods of `Option` as const:
- `is_some`
- `is_none`
- `as_ref`
These methods are currently const under the unstable feature `const_option` (tracking issue: #67441).
I believe these methods to be eligible for stabilization because of the stabilization of #49146 (Allow if and match in constants) and the trivial implementations, see also: [PR#75463](https://github.com/rust-lang/rust/pull/75463).
Related: #76225
|
|
Let user see the full type of type-length limit error
Seeing the full type of the error is sometimes essential to diagnosing the problem, but the type itself is too long to be displayed in the terminal in a useful fashion. This change solves this dilemma by writing the full offending type name to a file, and displays this filename as a note.
> note: the full type name been written to '$TEST_BUILD_DIR/issues/issue-22638/issue-22638.long-type.txt'
Closes #76777
|
|
Remove MMX from Rust
Follow-up to https://github.com/rust-lang/stdarch/pull/890
This removes most of MMX from Rust (tests pass with small changes), keeping stable `is_x86_feature_detected!("mmx")` working.
|
|
|
|
De-couple Python and bootstrap slightly
This revises rustbuild's entry points from Python to rely less on magic environment variables, preferring to use Cargo-provided environment variables where feasible.
Notably, BUILD_DIR and BOOTSTRAP_CONFIG are *not* moved, because both more-or-less have some non-trivial discovery logic and replicating it in rustbuild seems unfortunate; if it moved to Cargo that would be a different story.
Best reviewed by-commit.
|
|
Part of #76268
|
|
Stabilize the following methods of `Option` as const:
- `is_some`
- `is_none`
- `as_ref`
Possible because of stabilization of #49146 (Allow if and match in constants).
|