-
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 #121252
Rollup of 7 pull requests #121252
Commits on Jan 31, 2024
-
Configuration menu - View commit details
-
Copy full SHA for d907a6b - Browse repository at this point
Copy the full SHA d907a6bView commit details -
Add regression test for rust-lang#120471 to ensure that long crate na…
…me are handled as expected on mobile
Configuration menu - View commit details
-
Copy full SHA for 5d29f5a - Browse repository at this point
Copy the full SHA 5d29f5aView commit details
Commits on Feb 16, 2024
-
Detect when method call on argument could be removed to fulfill faile…
…d trait bound When encountering ```rust struct Foo; struct Bar; impl From<Bar> for Foo { fn from(_: Bar) -> Self { Foo } } fn qux(_: impl From<Bar>) {} fn main() { qux(Bar.into()); } ``` Suggest removing `.into()`: ``` error[E0283]: type annotations needed --> f100.rs:8:13 | 8 | qux(Bar.into()); | --- ^^^^ | | | required by a bound introduced by this call | = note: cannot satisfy `_: From<Bar>` note: required by a bound in `qux` --> f100.rs:6:16 | 6 | fn qux(_: impl From<Bar>) {} | ^^^^^^^^^ required by this bound in `qux` help: try using a fully qualified path to specify the expected types | 8 | qux(<Bar as Into<T>>::into(Bar)); | +++++++++++++++++++++++ ~ help: consider removing this method call, as the receiver has type `Bar` and `Bar: From<Bar>` can be fulfilled | 8 - qux(Bar.into()); 8 + qux(Bar); | ``` Fix rust-lang#71252
Configuration menu - View commit details
-
Copy full SHA for 9b3fcf9 - Browse repository at this point
Copy the full SHA 9b3fcf9View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5fbb1b2 - Browse repository at this point
Copy the full SHA 5fbb1b2View commit details
Commits on Feb 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for f5d43a0 - Browse repository at this point
Copy the full SHA f5d43a0View commit details -
Configuration menu - View commit details
-
Copy full SHA for f62a695 - Browse repository at this point
Copy the full SHA f62a695View commit details -
Configuration menu - View commit details
-
Copy full SHA for 38a2a65 - Browse repository at this point
Copy the full SHA 38a2a65View commit details -
Configuration menu - View commit details
-
Copy full SHA for 62b789f - Browse repository at this point
Copy the full SHA 62b789fView commit details -
Configuration menu - View commit details
-
Copy full SHA for d988d8f - Browse repository at this point
Copy the full SHA d988d8fView commit details
Commits on Feb 18, 2024
-
Rollup merge of rust-lang#120526 - GuillaumeGomez:mobile-long-crate-n…
…ame, r=notriddle rustdoc: Correctly handle long crate names on mobile Fixes rust-lang#120471. It now renders like this: ![image](https://github.com/rust-lang/rust/assets/3050060/065b4b8b-ba55-4163-a928-8d7bf735c111) r? `@notriddle`
Configuration menu - View commit details
-
Copy full SHA for fb5982f - Browse repository at this point
Copy the full SHA fb5982fView commit details -
Rollup merge of rust-lang#121100 - estebank:issue-71252, r=compiler-e…
…rrors Detect when method call on argument could be removed to fulfill failed trait bound When encountering ```rust struct Foo; struct Bar; impl From<Bar> for Foo { fn from(_: Bar) -> Self { Foo } } fn qux(_: impl From<Bar>) {} fn main() { qux(Bar.into()); } ``` Suggest removing `.into()`: ``` error[E0283]: type annotations needed --> f100.rs:8:13 | 8 | qux(Bar.into()); | --- ^^^^ | | | required by a bound introduced by this call | = note: cannot satisfy `_: From<Bar>` note: required by a bound in `qux` --> f100.rs:6:16 | 6 | fn qux(_: impl From<Bar>) {} | ^^^^^^^^^ required by this bound in `qux` help: try using a fully qualified path to specify the expected types | 8 | qux(<Bar as Into<T>>::into(Bar)); | +++++++++++++++++++++++ ~ help: consider removing this method call, as the receiver has type `Bar` and `Bar: From<Bar>` trivially holds | 8 - qux(Bar.into()); 8 + qux(Bar); | ``` Fix rust-lang#71252
Configuration menu - View commit details
-
Copy full SHA for 6499eb5 - Browse repository at this point
Copy the full SHA 6499eb5View commit details -
Rollup merge of rust-lang#121160 - fmease:rustdoc-fix-n-refactor-html…
…-rendering, r=GuillaumeGomez rustdoc: fix and refactor HTML rendering a bit * refactoring: get rid of a bunch of manual `f.alternate()` branches * not sure why this wasn't done so already, is this perf-sensitive? * fix an ICE in debug builds of rustdoc * rustdoc used to crash on empty outlives-bounds: `where 'a:` * properly escape const generic defaults * actually print empty trait and outlives-bounds (doesn't work for cross-crate reexports yet, will fix that at some other point) since they can have semantic significance * outlives-bounds: forces lifetime params to be early-bound instead of late-bound which is technically speaking part of the public API * trait-bounds: can affect the well-formedness, consider * makeshift “const-evaluatable” bounds under `generic_const_exprs` * bounds to force wf-checking in light of rust-lang#100041 (quite artificial I know, I couldn't figure out something better), see rust-lang#121160 (comment)
Configuration menu - View commit details
-
Copy full SHA for 28c0fa8 - Browse repository at this point
Copy the full SHA 28c0fa8View commit details -
Rollup merge of rust-lang#121198 - clubby789:unnamed-fields-hir-check…
…s, r=compiler-errors Add more checks for `unnamed_fields` during HIR analysis Fixes rust-lang#121151 I also found that we don't prevent enums here so ```rs #[repr(C)] #[derive(Debug)] enum A { #[default] B, C, } #[repr(C)] #[derive(Debug)] struct D { _: A, } ``` leads to an ICE on an `self.is_struct() || self.is_union()` assertion, so fixed that too.
Configuration menu - View commit details
-
Copy full SHA for 68cf537 - Browse repository at this point
Copy the full SHA 68cf537View commit details -
Rollup merge of rust-lang#121218 - ShoyuVanilla:fix-issue-76736, r=no…
…triddle Fix missing trait impls for type in rustc docs Fixes rust-lang#76736
Configuration menu - View commit details
-
Copy full SHA for 8ba0ad0 - Browse repository at this point
Copy the full SHA 8ba0ad0View commit details -
Rollup merge of rust-lang#121221 - fmease:refactor-astconv-assoc-item…
…-bindings, r=compiler-errors AstConv: Refactor lowering of associated item bindings a bit Split off from rust-lang#119385 as discussed, namely the first two commits (modulo one `FIXME` getting turned into a `NOTE`). The second commit removes `astconv::ConvertedBinding{,Kind}` in favor of `hir::TypeBinding{,Kind}`. The former was a — in my opinion — super useless intermediary. As you can tell from the diff, its removal shaves off some code. Furthermore, yeeting it will make it easier to implement the type resolution fixes in rust-lang#119385. Nothing in this PR should have any semantic effect. r? `@compiler-errors` <sub>**Addendum** as in rust-lang#118668: What I call “associated item bindings” are commonly referred to as “type bindings” for historical reasons. Nowadays, “type bindings” include assoc type bindings, assoc const bindings and RTN (return type notation) which is why I prefer not to use this outdated term.</sub>
Configuration menu - View commit details
-
Copy full SHA for 9811358 - Browse repository at this point
Copy the full SHA 9811358View commit details -
Rollup merge of rust-lang#121237 - Urgau:better-cargo-heuristic, r=co…
…mpiler-errors Use better heuristic for printing Cargo specific diagnostics It was [reported](rust-lang#82450 (comment)) in the check-cfg call for testing that the Rust for Linux project is setting the `CARGO` env without compiling with it, which is an issue since we are using the `CARGO` env as a proxy for "was launched from Cargo". This PR switch to the `CARGO_CRATE_NAME` [Cargo env](https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-crates), which shouldn't collide (as much) with other build systems. I also took the opportunity to consolidate all the checks under the same function.
Configuration menu - View commit details
-
Copy full SHA for 5628786 - Browse repository at this point
Copy the full SHA 5628786View commit details