-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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 #107400
Rollup of 8 pull requests #107400
Commits on Jan 19, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3122db7 - Browse repository at this point
Copy the full SHA 3122db7View commit details
Commits on Jan 23, 2023
-
Configuration menu - View commit details
-
Copy full SHA for da3ecb0 - Browse repository at this point
Copy the full SHA da3ecb0View commit details
Commits on Jan 25, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 800f1f3 - Browse repository at this point
Copy the full SHA 800f1f3View commit details -
Configuration menu - View commit details
-
Copy full SHA for b83ab0c - Browse repository at this point
Copy the full SHA b83ab0cView commit details
Commits on Jan 27, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 381187d - Browse repository at this point
Copy the full SHA 381187dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 43cb610 - Browse repository at this point
Copy the full SHA 43cb610View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5995e6 - Browse repository at this point
Copy the full SHA e5995e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5bfd90e - Browse repository at this point
Copy the full SHA 5bfd90eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 80a1536 - Browse repository at this point
Copy the full SHA 80a1536View commit details -
Configuration menu - View commit details
-
Copy full SHA for ff2413d - Browse repository at this point
Copy the full SHA ff2413dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0654374 - Browse repository at this point
Copy the full SHA 0654374View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a0b215 - Browse repository at this point
Copy the full SHA 8a0b215View commit details
Commits on Jan 28, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 3e9d1e4 - Browse repository at this point
Copy the full SHA 3e9d1e4View commit details -
Rollup merge of rust-lang#107022 - scottmcm:ordering-option-eq, r=m-o…
…u-se Implement `SpecOptionPartialEq` for `cmp::Ordering` Noticed as I continue to explore options for having code using `partial_cmp` optimize better. Before: ```llvm ; Function Attrs: mustprogress nofree nosync nounwind willreturn uwtable define noundef zeroext i1 `@ordering_eq(i8` noundef %0, i8 noundef %1) unnamed_addr #0 { start: %2 = icmp eq i8 %0, 2 br i1 %2, label %bb1.i, label %bb3.i bb1.i: ; preds = %start %3 = icmp eq i8 %1, 2 br label %"_ZN55_$LT$T$u20$as$u20$core..option..SpecOptionPartialEq$GT$2eq17hb7e7beacecde585fE.exit" bb3.i: ; preds = %start %.not.i = icmp ne i8 %1, 2 %4 = icmp eq i8 %0, %1 %spec.select.i = and i1 %.not.i, %4 br label %"_ZN55_$LT$T$u20$as$u20$core..option..SpecOptionPartialEq$GT$2eq17hb7e7beacecde585fE.exit" "_ZN55_$LT$T$u20$as$u20$core..option..SpecOptionPartialEq$GT$2eq17hb7e7beacecde585fE.exit": ; preds = %bb1.i, %bb3.i %.0.i = phi i1 [ %3, %bb1.i ], [ %spec.select.i, %bb3.i ] ret i1 %.0.i } ``` After: ```llvm ; Function Attrs: mustprogress nofree norecurse nosync nounwind readnone willreturn uwtable define noundef zeroext i1 `@ordering_eq(i8` noundef %0, i8 noundef %1) unnamed_addr #1 { start: %2 = icmp eq i8 %0, %1 ret i1 %2 } ``` (Which <https://alive2.llvm.org/ce/z/-rop5r> says LLVM *could* just do itself, but there's probably an issue already open for that problem from when this was originally looked at for `Option<NonZeroU8>` and friends.)
Configuration menu - View commit details
-
Copy full SHA for 7b78b6a - Browse repository at this point
Copy the full SHA 7b78b6aView commit details -
Rollup merge of rust-lang#107100 - compiler-errors:issue-107087, r=lcnr
Use proper `InferCtxt` when probing for associated types in astconv Fixes rust-lang#107087
Configuration menu - View commit details
-
Copy full SHA for 28188d1 - Browse repository at this point
Copy the full SHA 28188d1View commit details -
Rollup merge of rust-lang#107103 - compiler-errors:new-solver-evaluat…
…e_obligation, r=lcnr Use new solver in `evaluate_obligation` query (when new solver is enabled) (only when `-Ztrait-solver=next`, of course) ... Does this make sense? It seems to me like it should be reasonable, but maybe there's some reason why this is a bad idea. r? ``@lcnr`` Needs a perf run because I guess this `solver == TraitSolver::Next` check is on a hot path.
Configuration menu - View commit details
-
Copy full SHA for 3b6593a - Browse repository at this point
Copy the full SHA 3b6593aView commit details -
Rollup merge of rust-lang#107190 - fmease:fix-81698, r=compiler-errors
Recover from more const arguments that are not wrapped in curly braces Recover from some array, borrow, tuple & arithmetic expressions in const argument positions that lack curly braces and provide a suggestion to fix the issue continuing where rust-lang#92884 left off. Examples of such expressions: `[]`, `[0]`, `[1, 2]`, `[0; 0xff]`, `&9`, `("", 0)` and `(1 + 2) * 3` (we previously did not recover from them). I am not entirely happy with my current solution because the code that recovers from `[0]` (coinciding with a malformed slice type) and `[0; 0]` (coinciding with a malformed array type) is quite fragile as the aforementioned snippets are actually successfully parsed as types by `parse_ty` since it itself already recovers from them (returning `[⟨error⟩]` and `[⟨error⟩; 0]` respectively) meaning I have to manually look for `TyKind::Err`s and construct a separate diagnostic for the suggestion to attach to (thereby emitting two diagnostics in total). Fixes rust-lang#81698. `@rustbot` label A-diagnostics r? diagnostics
Configuration menu - View commit details
-
Copy full SHA for 260e048 - Browse repository at this point
Copy the full SHA 260e048View commit details -
Rollup merge of rust-lang#107306 - compiler-errors:correct-sugg-for-c…
…losure-arg-needs-borrow, r=oli-obk Correct suggestions for closure arguments that need a borrow Fixes rust-lang#107301 by dealing with binders correctly Fixes another issue where we were suggesting adding just `&` when we expected `&mut _` in a closure arg
Configuration menu - View commit details
-
Copy full SHA for fa2cd94 - Browse repository at this point
Copy the full SHA fa2cd94View commit details -
Rollup merge of rust-lang#107339 - aliemjay:covariant, r=lcnr
internally change regions to be covariant Surprisingly, we consider the reference type `&'a T` to be contravaraint in its lifetime parameter. This is confusing and conflicts with the documentation we have in the reference, rustnomicon, and rustc-dev-guide. This also arguably not the correct use of terminology since we can use `&'static u8` in a place where `&' a u8` is expected, this implies that `&'static u8 <: &' a u8` and consequently `'static <: ' a`, hence covariance. Because of this, when relating two types, we used to switch the argument positions in a confusing way: `Subtype(&'a u8 <: &'b u8) => Subtype('b <: 'a) => Outlives('a: 'b) => RegionSubRegion('b <= 'a)` The reason for the current behavior is probably that we wanted `Subtype('b <: 'a)` and `RegionSubRegion('b <= 'a)` to be equivalent, but I don' t think this is a good reason since these relations are sufficiently different in that the first is a relation in the subtyping lattice and is intrinsic to the type-systems, while the the second relation is an implementation detail of regionck. This PR changes this behavior to use covariance, so.. `Subtype(&'a u8 <: &'b u8) => Subtype('a <: 'b) => Outlives('a: 'b) => RegionSubRegion('b <= 'a) ` Resolves rust-lang#103676 r? `@lcnr`
Configuration menu - View commit details
-
Copy full SHA for a5caa98 - Browse repository at this point
Copy the full SHA a5caa98View commit details -
Rollup merge of rust-lang#107344 - compiler-errors:new-solver-tweaks,…
… r=lcnr Minor tweaks in the new solver 1. `InferCtxt::probe` is not needed in `compute_subtype_goal` and `compute_well_formed_goal`. 2. Add a handful of comments. 3. Add a micro-optimization in `consider_assumption` where we check the def-ids of the assumption and goal match before instantiating any binders. r? ``@lcnr``
Configuration menu - View commit details
-
Copy full SHA for ab769a0 - Browse repository at this point
Copy the full SHA ab769a0View commit details -
Rollup merge of rust-lang#107373 - michaelwoerister:dont-merge-vtable…
…s-when-debuginfo, r=WaffleLapkin Don't merge vtables when full debuginfo is enabled. This PR makes the compiler not emit the `unnamed_addr` attribute for vtables when full debuginfo is enabled, so that they don't get merged even if they have the same contents. This allows debuggers to more reliably map from a dyn pointer to the self-type of a trait object by looking at the vtable's debuginfo. The PR only changes the behavior of the LLVM backend as other backends don't emit vtable debuginfo (as far as I can tell). The performance impact of this change should be small as [measured](rust-lang#103514 (comment)) in a previous PR.
Configuration menu - View commit details
-
Copy full SHA for c89bb15 - Browse repository at this point
Copy the full SHA c89bb15View commit details