-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rollup of 8 pull requests #102920
Rollup of 8 pull requests #102920
Commits on Sep 14, 2022
-
Warn about safety of
fetch_update
Specifically as it relates to the ABA problem.
Configuration menu - View commit details
-
Copy full SHA for 3d28a1a - Browse repository at this point
Copy the full SHA 3d28a1aView commit details
Commits on Sep 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2ea770d - Browse repository at this point
Copy the full SHA 2ea770dView commit details
Commits on Sep 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2c72ea7 - Browse repository at this point
Copy the full SHA 2c72ea7View commit details
Commits on Oct 5, 2022
-
The EH actions stored in the LSDA follows the format of GCC except table (even for LLVM-generated code). An missing action in the table is the encoding for `Terminate`, see [1]. The currently code interprets it as `None`, as a workaround for rust-lang#35011, an issue that seems to occur in LLVM 3.7 and not after 3.9. These are very old versions of LLVM and we don't support them anymore, so remove this workaround and interpret them properly. Note that LLVM currently does not emit any `Terminate` actions, but GCC does. Although GCC backend currently doesn't do unwinding, removing it preemptively would prevent future developers from wasting time to figure out what's wrong. [1]: https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_personality.cc#L522-L526
Configuration menu - View commit details
-
Copy full SHA for 8bda133 - Browse repository at this point
Copy the full SHA 8bda133View commit details
Commits on Oct 7, 2022
-
ADD - codegen_ssa initial diags translations machinery
ADD - migrate MissingNativeStaticLibrary fatal error
Configuration menu - View commit details
-
Copy full SHA for b0b072d - Browse repository at this point
Copy the full SHA b0b072dView commit details -
ADD - migrate lib.def write fatal error
This diagnostic has no UI test 🤔 Should we add some? If so, how?
Configuration menu - View commit details
-
Copy full SHA for 4e0de53 - Browse repository at this point
Copy the full SHA 4e0de53View commit details -
UPDATE - LibDefWriteFailure to accept type instead of formatted string
This follows team’s suggestions in this thread https://rust-lang.zulipchat.com/#narrow/stream/336883-i18n/topic/.23100717.20diag.20translation/near/295305249
Configuration menu - View commit details
-
Copy full SHA for 0a2d7f8 - Browse repository at this point
Copy the full SHA 0a2d7f8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 086e70f - Browse repository at this point
Copy the full SHA 086e70fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d9197db - Browse repository at this point
Copy the full SHA d9197dbView commit details -
Configuration menu - View commit details
-
Copy full SHA for 67eb01c - Browse repository at this point
Copy the full SHA 67eb01cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7548d95 - Browse repository at this point
Copy the full SHA 7548d95View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0f97d4a - Browse repository at this point
Copy the full SHA 0f97d4aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 12aa84b - Browse repository at this point
Copy the full SHA 12aa84bView commit details -
- UPDATE - revert migration of logs - UPDATE - use derive on LinkRlibError enum - [Gardening] UPDATE - alphabetically sort fluent_messages - UPDATE - use PathBuf and unify both AddNativeLibrary to use Display (which is what PathBuf uses when conforming to IntoDiagnosticArg) - UPDATE - fluent messages sort after rebase
Configuration menu - View commit details
-
Copy full SHA for a25f939 - Browse repository at this point
Copy the full SHA a25f939View commit details -
Configuration menu - View commit details
-
Copy full SHA for 13d4f27 - Browse repository at this point
Copy the full SHA 13d4f27View commit details
Commits on Oct 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c1c159f - Browse repository at this point
Copy the full SHA c1c159fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6826028 - Browse repository at this point
Copy the full SHA 6826028View commit details
Commits on Oct 11, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 152cd63 - Browse repository at this point
Copy the full SHA 152cd63View commit details -
Rollup merge of rust-lang#100387 - cjgillot:hygiene-trait-impl, r=pet…
…rochenkov Check uniqueness of impl items by trait item when applicable. When checking uniqueness of item names in impl blocks, we currently use the same definition of hygiene as for toplevel items. This means that a plain item and one generated by a macro 2.0 do not collide. This hygiene rule does not match with how impl items resolve to associated trait items. As a consequence, we misdiagnose the trait impls. This PR proposes to consider that trait impl items are uses of the corresponding trait items during resolution, instead of checking for duplicates later. An error is emitted when a trait impl item is used twice. There should be no stable breakage, since macros 2.0 are still unstable. r? `@petrochenkov` cc `@RalfJung` Fixes rust-lang#71614.
Configuration menu - View commit details
-
Copy full SHA for 6be5db8 - Browse repository at this point
Copy the full SHA 6be5db8View commit details -
Rollup merge of rust-lang#101727 - est31:stabilize_map_first_last, r=…
…m-ou-se Stabilize map_first_last Stabilizes the following functions: ```Rust impl<T> BTreeSet<T> { pub fn first(&self) -> Option<&T> where T: Ord; pub fn last(&self) -> Option<&T> where T: Ord; pub fn pop_first(&mut self) -> Option<T> where T: Ord; pub fn pop_last(&mut self) -> Option<T> where T: Ord; } impl<K, V> BTreeMap<K, V> { pub fn first_key_value(&self) -> Option<(&K, &V)> where K: Ord; pub fn last_key_value(&self) -> Option<(&K, &V)> where K: Ord; pub fn first_entry(&mut self) -> Option<OccupiedEntry<'_, K, V>> where K: Ord; pub fn last_entry(&mut self) -> Option<OccupiedEntry<'_, K, V>> where K: Ord; pub fn pop_first(&mut self) -> Option<(K, V)> where K: Ord; pub fn pop_last(&mut self) -> Option<(K, V)> where K: Ord; } ``` Closes rust-lang#62924 ~~Blocked on the [FCP](rust-lang#62924 (comment)) finishing.~~ Edit: It finished!
Configuration menu - View commit details
-
Copy full SHA for 9bf2e53 - Browse repository at this point
Copy the full SHA 9bf2e53View commit details -
Rollup merge of rust-lang#101774 - Riolku:atomic-update-aba, r=m-ou-se
Warn about safety of `fetch_update` Specifically as it relates to the ABA problem. `fetch_update` is a useful function, and one that isn't provided by, say, C++. However, this does mean the function is magic. It is implemented in terms of `compare_exchange_weak`, and in particular, suffers from the ABA problem. See the following code, which is a naive implementation of `pop` in a lock-free queue: ```rust fn pop(&self) -> Option<i32> { self.front.fetch_update(Ordering::Relaxed, Ordering::Acquire, |front| { if front == ptr::null_mut() { None } else { Some(unsafe { (*front).next }) } }.ok() } ``` This code is unsound if called from multiple threads because of the ABA problem. Specifically, suppose nodes are allocated with `Box`. Suppose the following sequence happens: ``` Initial: Queue is X -> Y. Thread A: Starts popping, is pre-empted. Thread B: Pops successfully, twice, leaving the queue empty. Thread C: Pushes, and `Box` returns X (very common for allocators) Thread A: Wakes up, sees the head is still X, and stores Y as the new head. ``` But `Y` is deallocated. This is undefined behaviour. Adding a note about this problem to `fetch_update` should hopefully prevent users from being misled, and also, a link to this common problem is, in my opinion, an improvement to our docs on atomics.
Configuration menu - View commit details
-
Copy full SHA for 3f4b987 - Browse repository at this point
Copy the full SHA 3f4b987View commit details -
Rollup merge of rust-lang#102227 - devnexen:solarish_get_path, r=m-ou-se
fs::get_path solarish version. similar to linux, albeit there is no /proc/self notion on solaris based system thus flattening the difference for simplification sake.
Configuration menu - View commit details
-
Copy full SHA for 16914c9 - Browse repository at this point
Copy the full SHA 16914c9View commit details -
Rollup merge of rust-lang#102612 - JhonnyBillM:migrate-codegen-ssa-to…
…-diagnostics-structs, r=davidtwco Migrate `codegen_ssa` to diagnostics structs - [Part 1] Initial migration of `codegen_ssa`. Going to split this crate migration in at least two PRs in order to avoid a huge PR and to quick off some questions around: 1. Translating messages from "external" crates. 2. Interfacing with OS messages. 3. Adding UI tests while migrating diagnostics. _See comments below._
Configuration menu - View commit details
-
Copy full SHA for 4be1c94 - Browse repository at this point
Copy the full SHA 4be1c94View commit details -
Rollup merge of rust-lang#102685 - nbdd0121:unwind, r=m-ou-se
Interpret EH actions properly The EH actions stored in the LSDA follows the format of GCC except table (even for LLVM-generated code). An missing action in the table is the encoding for `Terminate`, see https://github.com/gcc-mirror/gcc/blob/master/libstdc%2B%2B-v3/libsupc%2B%2B/eh_personality.cc#L522-L526. The currently code interprets it as `None`, as a workaround for rust-lang#35011, an issue that seems to occur in LLVM 3.7 and not after 3.9. These are very old versions of LLVM and we don't support them anymore, so remove this workaround and interpret them properly. Note that LLVM currently does not emit any `Terminate` actions, but GCC does. Although GCC backend currently doesn't do unwinding, removing it preemptively would prevent future developers from wasting time to figure out what's wrong. `@rustbot` label: +T-compiler
Configuration menu - View commit details
-
Copy full SHA for 638ce35 - Browse repository at this point
Copy the full SHA 638ce35View commit details -
Rollup merge of rust-lang#102830 - compiler-errors:constness-parity, …
…r=fee1-dead Unify `tcx.constness` query and param env constness checks The checks that we do in the `constness` query seem inconsistent with the checks that we do to determine if an item's param-env is const, so I merged them into the `constness` query and call that from the `param_env` query. I'm not sure if this totally makes sense -- is there a case where `tcx.param_env()` would return a const param-env for an item whose `tcx.constness()` is `Constness::NotConst`? Because if not, it seems a bit dangerous that these two differ. Luckily, not many places actually use `tcx.constness()`, and the checks in `tcx.param_env()` seem stricter than the checks in `tcx.constness()` (at least for the types of items we type-check). Also, due to the way that `tcx.param_env()` is implemented, it _never_ used to return a const param-env for a item coming from a different crate, which also seems dangerous (though also probably not weaponizable currently, because we seldom actually compute the param-env for a non-local item).
Configuration menu - View commit details
-
Copy full SHA for 18325e9 - Browse repository at this point
Copy the full SHA 18325e9View commit details -
Rollup merge of rust-lang#102893 - TaKO8Ki:fix-102878, r=davidtwco
Fix ICE rust-lang#102878 Fixes rust-lang#102878
Configuration menu - View commit details
-
Copy full SHA for 2e26805 - Browse repository at this point
Copy the full SHA 2e26805View commit details