-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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 7 pull requests #95662
Rollup of 7 pull requests #95662
Commits on Apr 2, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b899251 - Browse repository at this point
Copy the full SHA b899251View commit details
Commits on Apr 3, 2022
-
Configuration menu - View commit details
-
Copy full SHA for f0ec783 - Browse repository at this point
Copy the full SHA f0ec783View commit details -
Configuration menu - View commit details
-
Copy full SHA for 84a343d - Browse repository at this point
Copy the full SHA 84a343dView commit details
Commits on Apr 4, 2022
-
Configuration menu - View commit details
-
Copy full SHA for e0919de - Browse repository at this point
Copy the full SHA e0919deView commit details -
Configuration menu - View commit details
-
Copy full SHA for a56f214 - Browse repository at this point
Copy the full SHA a56f214View commit details -
Configuration menu - View commit details
-
Copy full SHA for 637592d - Browse repository at this point
Copy the full SHA 637592dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 58dfe26 - Browse repository at this point
Copy the full SHA 58dfe26View commit details -
Mention implementers of unsatisfied trait
When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the following other types implement trait `Foo`: Option<T> i32 str note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` Mention implementers of traits in `ImplObligation`s. Do not mention other `impl`s for closures, ranges and `?`.
Configuration menu - View commit details
-
Copy full SHA for 3aac307 - Browse repository at this point
Copy the full SHA 3aac307View commit details -
Configuration menu - View commit details
-
Copy full SHA for ac8cbbd - Browse repository at this point
Copy the full SHA ac8cbbdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 883b93c - Browse repository at this point
Copy the full SHA 883b93cView commit details -
Configuration menu - View commit details
-
Copy full SHA for e2bba07 - Browse repository at this point
Copy the full SHA e2bba07View commit details -
Configuration menu - View commit details
-
Copy full SHA for ef91519 - Browse repository at this point
Copy the full SHA ef91519View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3109c93 - Browse repository at this point
Copy the full SHA 3109c93View commit details -
Configuration menu - View commit details
-
Copy full SHA for a6301ca - Browse repository at this point
Copy the full SHA a6301caView commit details -
Configuration menu - View commit details
-
Copy full SHA for e1ef833 - Browse repository at this point
Copy the full SHA e1ef833View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0252fc9 - Browse repository at this point
Copy the full SHA 0252fc9View commit details -
Rollup merge of rust-lang#91873 - estebank:mention-impls-for-unsatisf…
…ied-trait, r=davidtwco Mention implementers of unsatisfied trait When encountering an unsatisfied trait bound, if there are no other suggestions, mention all the types that *do* implement that trait: ``` error[E0277]: the trait bound `f32: Foo` is not satisfied --> $DIR/impl_wf.rs:22:6 | LL | impl Baz<f32> for f32 { } | ^^^^^^^^ the trait `Foo` is not implemented for `f32` | = help: the trait `Foo` is implemented for `i32` note: required by a bound in `Baz` --> $DIR/impl_wf.rs:18:31 | LL | trait Baz<U: ?Sized> where U: Foo { } | ^^^ required by this bound in `Baz` ``` ``` error[E0277]: the trait bound `u32: Foo` is not satisfied --> $DIR/associated-types-path-2.rs:29:5 | LL | f1(2u32, 4u32); | ^^ the trait `Foo` is not implemented for `u32` | = help: the trait `Foo` is implemented for `i32` note: required by a bound in `f1` --> $DIR/associated-types-path-2.rs:13:14 | LL | pub fn f1<T: Foo>(a: T, x: T::A) {} | ^^^ required by this bound in `f1` ``` Suggest dereferencing in more cases. Fix rust-lang#87437, fix rust-lang#90970.
Configuration menu - View commit details
-
Copy full SHA for a5c8169 - Browse repository at this point
Copy the full SHA a5c8169View commit details -
Rollup merge of rust-lang#95588 - RalfJung:strict-provenance, r=scottmcm
explicitly distinguish pointer::addr and pointer::expose_addr ``@bgeron`` pointed out that the current docs promise that `ptr.addr()` and `ptr as usize` are equivalent. I don't think that is a promise we want to make. (Conceptually, `ptr as usize` might 'escape' the provenance to enable future `usize as ptr` casts, but `ptr.addr()` dertainly does not do that.) So I propose we word the docs a bit more carefully here. ``@Gankra`` what do you think?
Configuration menu - View commit details
-
Copy full SHA for 3bf33b9 - Browse repository at this point
Copy the full SHA 3bf33b9View commit details -
Rollup merge of rust-lang#95603 - compiler-errors:dyn-return, r=oli-obk
Fix late-bound ICE in `dyn` return type suggestion This fixes the root-cause of the attached issues -- the root problem is that we're using the return type from a signature with late-bound instead of early-bound regions. The change on line 1087 (`let Some(liberated_sig) = typeck_results.liberated_fn_sigs().get(fn_hir_id) else { return false; };`) makes sure we're grabbing the _right_ return type for this suggestion to check the `dyn` predicates with. Fixes rust-lang#91801 Fixes rust-lang#91803 This fix also includes some drive-by changes, specifically: 1. Don't suggest boxing when we have `-> dyn Trait` and are already returning `Box<T>` where `T: Trait` (before we always boxed the value). 2. Suggestion applies even when the return type is a type alias (e.g. `type Foo = dyn Trait`). This does cause the suggestion to expand to the aliased type, but I think it's still beneficial. 3. Split up the multipart suggestion because there's a 6-line max in the printed output... I am open to splitting out the above changes, if we just want to fix the ICE first. cc: ```@terrarier2111``` and rust-lang#92289
Configuration menu - View commit details
-
Copy full SHA for 92e53f5 - Browse repository at this point
Copy the full SHA 92e53f5View commit details -
Rollup merge of rust-lang#95620 - RalfJung:memory-no-extras, r=oli-obk
interpret: remove MemoryExtra in favor of giving access to the Machine The Miri PR for this is upcoming. r? ``@oli-obk``
Configuration menu - View commit details
-
Copy full SHA for 78f81f0 - Browse repository at this point
Copy the full SHA 78f81f0View commit details -
Rollup merge of rust-lang#95630 - declanvk:update-nonnull-doc, r=Ralf…
…Jung Update `NonNull` pointer provenance methods' documentation - Add links to equivalent methods on raw pointers
Configuration menu - View commit details
-
Copy full SHA for 1c2b4b7 - Browse repository at this point
Copy the full SHA 1c2b4b7View commit details -
Rollup merge of rust-lang#95631 - TaKO8Ki:remove-unnecessary-nested-b…
…locks, r=davidtwco Refactor: remove unnecessary nested blocks
Configuration menu - View commit details
-
Copy full SHA for 5b8ac2d - Browse repository at this point
Copy the full SHA 5b8ac2dView commit details -
Rollup merge of rust-lang#95642 - lcnr:probe-smol, r=compiler-errors
`CandidateSource::XCandidate` -> `CandidateSource::X`
Configuration menu - View commit details
-
Copy full SHA for b3c3eda - Browse repository at this point
Copy the full SHA b3c3edaView commit details