-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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 5 pull requests #106529
Rollup of 5 pull requests #106529
Conversation
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
This allows the expressions to have more accurate types when showing inference steps.
- Only point at a the single expression where the found type was first inferred. - Find method call argument that might have caused the found type to be inferred. - Provide structured suggestion. - Apply some review comments. - Tweak wording.
```rust fn main() { let v = Vec::new(); v.push(0); v.push(0); v.push(""); } ``` now produces ``` error[E0308]: mismatched types --> $DIR/point-at-inference-3.rs:6:12 | LL | v.push(0); | - this is of type `{integer}`, which makes `v` to be inferred as `Vec<{integer}>` ... LL | v.push(""); | ---- ^^ expected integer, found `&str` | | | arguments to this function are incorrect | note: associated function defined here --> $SRC_DIR/alloc/src/vec/mod.rs:LL:COL ```
According to [caniuse], the only supported browser that requires the vendor prefix, as defined in [RFC 1985], is Safari. * The last version of Chrome that required a vendor prefix was version 53. The current version is 108. * Firefox 68 is the last version that required a vendor prefix. The [current Firefox ESR] is version 102. * The current version of Safari for Mac and iOS still requires a prefix. * The last version of Edge that required a vendor frefix was 18. The current version of Edge is 108. * UCAndroid support is unknown, but if it still requires a vendor prefix, it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they would want to emulate iOS for compatibility. [caniuse]: https://caniuse.com/?search=user-select [RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html [current Firefox ESR]: https://wiki.mozilla.org/Releases
check explicitly for the type references error if ty.references_error() is true change the error to be err.delay_as_bug() and prevent the error E0029 and E0277 from emitting out this fix rust-lang#105946
Point at expressions where inference refines an unexpected type Fix rust-lang#106355. Fix rust-lang#14007. (!) ``` error[E0308]: mismatched types --> src/test/ui/type/type-check/point-at-inference.rs:12:9 | 9 | foo.push(i); | - this is of type `&{integer}`, which makes `foo` to be inferred as `Vec<&{integer}>` ... 12 | bar(foo); | --- ^^^ expected `i32`, found `&{integer}` | | | arguments to this function are incorrect | = note: expected struct `Vec<i32>` found struct `Vec<&{integer}>` note: function defined here --> src/test/ui/type/type-check/point-at-inference.rs:2:4 | 2 | fn bar(_: Vec<i32>) {} | ^^^ ----------- help: consider dereferencing the borrow | 9 | foo.push(*i); | + ```
…laumeGomez,notriddle Fix error-index redirect to work with the back button. This fixes the redirect page at https://doc.rust-lang.org/error-index.html so that it works with the browser's back-button. The solution is to use `window.location.replace()`, which avoids adding the page to the browser history stack. This also cleans up the code a little bit, since it looks like it was written with different assumptions (maybe before f5857d5). I don't think there is a need to have a redirect at https://doc.rust-lang.org/error_codes/error-index.html since I don't think fragment-based links were ever used there. I have tested with Firefox, Chrome, and Safari. Going to `/error-index.html` redirects without adding to the stack, and can use the back button. Additionally, `/error-index.html#E0005` redirects correctly to the error page. Finally, there is an unrelated commit to remove the 404 hack. There is an official way of avoiding the generation of the 404 page with setting input-404 to an empty value. Fixes rust-lang#106485
…errors Add regression test for rust-lang#58355 Closes rust-lang#58355 r? `@compiler-errors` Signed-off-by: Yuki Okushi <jtitor@2k36.org>
…ebank fix [type error] for error E0029 and E0277 check explicitly for the type references error if ty.references_error() is true change the error to be err.delay_as_bug() and prevent the error E0029 and E0277 from emitting out this fix rust-lang#105946
…=GuillaumeGomez rustdoc: remove legacy user-select CSS According to [caniuse], the only supported browser that requires the vendor prefix, as defined in [RFC 1985], is Safari. * The last version of Chrome that required a vendor prefix was version 53. The current version is 108. * Firefox 68 is the last version that required a vendor prefix. The [current Firefox ESR] is version 102. * The current version of Safari for Mac and iOS still requires a prefix. * The last version of Edge that required a vendor frefix was 18. The current version of Edge is 108. * UCAndroid support is unknown, but if it still requires a vendor prefix, it's more likely to be `-webkit-` than `-moz-` or `-ms-`, since they would want to emulate iOS for compatibility. [caniuse]: https://caniuse.com/?search=user-select [RFC 1985]: https://rust-lang.github.io/rfcs/1985-tiered-browser-support.html [current Firefox ESR]: https://wiki.mozilla.org/Releases
@bors r+ rollup=never p=5 |
☀️ Test successful - checks-actions |
📌 Perf builds for each rolled up PR: previous master: ce8fbe7901 In the case of a perf regression, run the following command for each PR you suspect might be the cause: |
Finished benchmarking commit (1146560): comparison URL. Overall result: ❌✅ regressions and improvements - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResultsThis is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
|
Successful merges:
dyn Fn(...) -> UnsizedTy
#58355)Failed merges:
r? @ghost
@rustbot modify labels: rollup
Create a similar rollup