- 29 6月, 2022 32 次提交
-
-
由 Dylan DPC 提交于
Add `fetch_not` method on `AtomicBool` This PR adds a `fetch_not` method on `AtomicBool` performs the NOT operation on the inner value. Internally, this just calls the `fetch_xor` method with the value `true`. [See this IRLO discussion](https://internals.rust-lang.org/t/could-we-have-fetch-not-for-atomicbool-s/16881)
-
由 Dylan DPC 提交于
Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic` Self-explanatory r? ```@davidtwco```
-
由 bors 提交于
Update `smallvec` to 1.8.1. This pulls in https://github.com/servo/rust-smallvec/pull/282, which gives some small wins for rustc. r? `@lqd`
-
由 bors 提交于
Rollup of 7 pull requests Successful merges: - #97423 (Simplify memory ordering intrinsics) - #97542 (Use typed indices in argument mismatch algorithm) - #97786 (Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths) - #98277 (Fix trait object reborrow suggestion) - #98525 (Add regression test for #79224) - #98549 (interpret: do not prune requires_caller_location stack frames quite so early) - #98603 (Some borrowck diagnostic fixes) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Dylan DPC 提交于
Some borrowck diagnostic fixes 1. Remove some redundant `.as_ref` suggestion logic from borrowck, this has the consequence of also not suggesting `.as_ref` after `Option` methods, but (correctly) before. 2. Fix a bug where we were replacing a binding's name with a type. Instead, make it a note. This is somewhat incomplete. See `src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rs` for more improvements.
-
由 Dylan DPC 提交于
interpret: do not prune requires_caller_location stack frames quite so early https://github.com/rust-lang/rust/pull/87000 made the interpreter skip `caller_location` frames for its stacktraces and `cur_span`. However, those functions are used for much more than just panic reporting, and e.g. when Miri reports UB somewhere, it probably wants to point inside `caller_location` frames. (And if it did not, it would want to have its own logic to decide that, not be forced into it by the core interpreter engine.) This fixes some rare ICEs in Miri that say "we should never pop more than one frame at once". So let's remove all `caller_location` logic from the core interpreter, and instead move it to CTFE error reporting. This does not change user-visible behavior. That's the first commit. We might additionally want to change CTFE error reporting to treat panics differently from other errors: only prune `caller_location` frames for panics. The second commit does that. But honestly I am not sure if this is an improvement. r? ``@oli-obk``
-
由 Dylan DPC 提交于
Add regression test for #79224 Closes #79224 r? `@compiler-errors` Signed-off-by: NYuki Okushi <jtitor@2k36.org>
-
由 Dylan DPC 提交于
Fix trait object reborrow suggestion Fixes #93596 Slightly generalizes the logic we use to suggest fix first implemented in #95609, specifically when we have a `Sized` obligation that comes from a struct's unsized tail.
-
由 Dylan DPC 提交于
Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths Discovered in #97682, `-Z simulate-remapped-rust-src-base` only partially simulated the behavior of `remap-debuginfo = true`. While the flag successfully simulates the remapping when stdlib's `rmeta` file is loaded, the simulated prefix was not accounted for when the remapped path's local path was being discovered. This caused the flag to not fully simulate the behavior of `remap-debuginfo = true`, leading to inconsistent behaviors. This PR fixes https://github.com/rust-lang/rust/issues/97682 by also accounting for the simulated path.
-
由 Dylan DPC 提交于
Use typed indices in argument mismatch algorithm I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array. Other drive-by changes: 1. Factor this logic into a new function, so we don't need to `break 'label` to escape it. 1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`. 1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`. ~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557 cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR. fixes #97484
-
由 Dylan DPC 提交于
Simplify memory ordering intrinsics This changes the names of the atomic intrinsics to always fully include their memory ordering arguments. ```diff - atomic_cxchg + atomic_cxchg_seqcst_seqcst - atomic_cxchg_acqrel + atomic_cxchg_acqrel_release - atomic_cxchg_acqrel_failrelaxed + atomic_cxchg_acqrel_relaxed // And so on. ``` - `seqcst` is no longer implied - The failure ordering on chxchg is no longer implied in some cases, but now always explicitly part of the name. - `release` is no longer shortened to just `rel`. That was especially confusing, since `relaxed` also starts with `rel`. - `acquire` is no longer shortened to just `acq`, such that the names now all match the `std::sync::atomic::Ordering` variants exactly. - This now allows for more combinations on the compare exchange operations, such as `atomic_cxchg_acquire_release`, which is necessary for #68464. - This PR only exposes the new possibilities through unstable intrinsics, but not yet through the stable API. That's for [a separate PR](https://github.com/rust-lang/rust/pull/98383) that requires an FCP. Suffixes for operations with a single memory order: | Order | Before | After | |---------|--------------|------------| | Relaxed | `_relaxed` | `_relaxed` | | Acquire | `_acq` | `_acquire` | | Release | `_rel` | `_release` | | AcqRel | `_acqrel` | `_acqrel` | | SeqCst | (none) | `_seqcst` | Suffixes for compare-and-exchange operations with two memory orderings: | Success | Failure | Before | After | |---------|---------|--------------------------|--------------------| | Relaxed | Relaxed | `_relaxed` | `_relaxed_relaxed` | | Relaxed | Acquire |
❌ | `_relaxed_acquire` | | Relaxed | SeqCst |❌ | `_relaxed_seqcst` | | Acquire | Relaxed | `_acq_failrelaxed` | `_acquire_relaxed` | | Acquire | Acquire | `_acq` | `_acquire_acquire` | | Acquire | SeqCst |❌ | `_acquire_seqcst` | | Release | Relaxed | `_rel` | `_release_relaxed` | | Release | Acquire |❌ | `_release_acquire` | | Release | SeqCst |❌ | `_release_seqcst` | | AcqRel | Relaxed | `_acqrel_failrelaxed` | `_acqrel_relaxed` | | AcqRel | Acquire | `_acqrel` | `_acqrel_acquire` | | AcqRel | SeqCst |❌ | `_acqrel_seqcst` | | SeqCst | Relaxed | `_failrelaxed` | `_seqcst_relaxed` | | SeqCst | Acquire | `_failacq` | `_seqcst_acquire` | | SeqCst | SeqCst | (none) | `_seqcst_seqcst` | -
由 bors 提交于
Make empty bounds lower to `WellFormed` and make `WellFormed` coinductive r? rust-lang/types
-
由 bors 提交于
Improve some deriving code and add a test The `.stdout` test is particularly useful. r? `@petrochenkov`
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 Michael Goulet 提交于
-
由 bors 提交于
rustdoc: reference function signature types from the `p` array This reduces the size of the function signature index, because it's common to have many functions that operate on the same types. $ wc -c search-index-old.js search-index-new.js 5224374 search-index-old.js 3932314 search-index-new.js By my math, this reduces the uncompressed size of the search index by 32%. On compressed signatures, the wins are less drastic, a mere 8%: $ wc -c search-index-old.js.gz search-index-new.js.gz 404532 search-index-old.js.gz 371635 search-index-new.js.gz
-
由 bors 提交于
Rollup of 11 pull requests Successful merges: - #98548 (rustdoc-json: Allow Typedef to be different in sanity assert) - #98560 (Add regression test for #85907) - #98564 (Remove references to `./tmp` in-tree) - #98602 (Add regression test for #80074) - #98606 (
⬆ rust-analyzer) - #98609 (Fix ICE for associated constant generics) - #98611 (Fix glob import ICE in rustdoc JSON format) - #98617 (Remove feature `const_option` from std) - #98619 (Fix mir-opt wg name) - #98621 (llvm-wrapper: adapt for removal of the ASanGlobalsMetadataAnalysis LLVM API) - #98623 (fix typo in comment) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup -
由 Matthias Krüger 提交于
fix typo in comment
-
由 Matthias Krüger 提交于
llvm-wrapper: adapt for removal of the ASanGlobalsMetadataAnalysis LLVM API No functional changes intended. This adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/dacfa24f75c328ae30b710ecadaa18e4ba10cdc6, which removed `ASanGlobalsMetadataAnalysis`. Found via our experimental rust + HEAD llvm bot: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/11565#0181a72f-75bb-4378-88f0-4c0bca7d03fa/231-505.
-
由 Matthias Krüger 提交于
Fix mir-opt wg name r? ``@ehuss``
-
由 Matthias Krüger 提交于
Remove feature `const_option` from std This is part of the effort to reduce the number of unstable features used by std. This one is easy as it's only used in one place.
-
由 Matthias Krüger 提交于
Fix glob import ICE in rustdoc JSON format Fixes #98003. r? `@notriddle`
-
由 Matthias Krüger 提交于
Fix ICE for associated constant generics Fixes #98432
-
由 Matthias Krüger 提交于
⬆ rust-analyzer r? ``@ghost`` -
由 Matthias Krüger 提交于
Add regression test for #80074 closes #80074
-
由 Matthias Krüger 提交于
Remove references to `./tmp` in-tree These used to be used by codegen-units tests, but were switched from manually specifying directories to just using `// incremental` in https://github.com/rust-lang/rust/pull/89101. Remove the old references. Fixes https://github.com/rust-lang/rust/issues/34586.
-
由 Matthias Krüger 提交于
Add regression test for #85907 closes #85907
-
由 Matthias Krüger 提交于
rustdoc-json: Allow Typedef to be different in sanity assert Closes #98547 This fix is a natural extension of #98053. r? `@notriddle` (Since you reviewed the other PR.) CC `@GuillaumeGomez` `@rustbot` labels +A-rustdoc-json +T-rustdoc
-
由 bors 提交于
proc_macro/bridge: stop using a remote object handle for proc_macro Punct and Group This is the third part of https://github.com/rust-lang/rust/pull/86822, split off as requested in https://github.com/rust-lang/rust/pull/86822#pullrequestreview-1008655452. This patch transforms the `Punct` and `Group` types into structs serialized over IPC rather than handles, making them more efficient to create and manipulate from within proc-macros.
-
- 28 6月, 2022 8 次提交
-
-
由 Proloy Mishra 提交于
-
由 Krasimir Georgiev 提交于
This adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/dacfa24f75c328ae30b710ecadaa18e4ba10cdc6, which removed ASanGlobalsMetadataAnalysis.
-
由 Nika Layzell 提交于
longer names for RPC generics and reduced dependency on macros in the server.
-
由 bors 提交于
Rollup of 9 pull requests Successful merges: - #97346 (Remove a back-compat hack on lazy TAIT) - #98261 (Remove `MAX_SUGGESTION_HIGHLIGHT_LINES`) - #98337 ([RFC 2011] Optimize non-consuming operators) - #98384 (Fix RSS reporting on macOS) - #98420 (translation: lint fix + more migration) - #98430 (Refactor iter adapters with less macros) - #98555 (Hermit: Fix initializing lazy locks) - #98595 (Implement `Send` and `Sync` for `ThinBox<T>`) - #98597 (Remove unstable CStr/CString change from 1.62 release note) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
-
由 Mark Rousskov 提交于
-
由 Chris Denton 提交于
-
由 Chris Denton 提交于
-
由 Dylan DPC 提交于
Remove unstable CStr/CString change from 1.62 release note (Discovered in https://github.com/rust-lang/rust/pull/98571#discussion_r907469604) The change to move CStr/CString to core/alloc is currently behind feature flags as stated in https://github.com/rust-lang/rust/issues/98314
-