about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2023-01-06Tweak outputEsteban Küber-55/+35
2023-01-06Report WF error for new solver tooMichael Goulet-4/+4
2023-01-05Test again wasm32-unknown-unknownAaron Hill-2/+80
2023-01-05Ignore symbol shim clash when symbol is provided by `compiler_builtins`Aaron Hill-1/+10
When this happens, we ignore the symbol from `compiler_builtins` in favor of Miri's builtin support. This allows Miri to target platforms like wasm32-unknown-unknown, where functions like `memcmp` are provided by `compiler_builtins`.
2023-01-06Detect bindings assigned blocks without tail expressions in trait errorsEsteban Küber-9/+65
Address #44173 for trait errors.
2023-01-06Detect bindings assigned blocks without tail expressionsEsteban Küber-0/+95
Address #44173 for type check errors.
2023-01-05Detect closures assigned to binding in blockEsteban Küber-24/+33
Fix #58497.
2023-01-05error-index: Don't generate 404 instead of removing it.Eric Huss-3/+1
2023-01-05Fix error-index redirect to work with back button.Eric Huss-11/+10
2023-01-05rustdoc: remove legacy user-select CSSMichael Howell-2/+0
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
2023-01-05Correct detection of elided lifetimes in impl-trait.Camille GILLOT-0/+5
2023-01-05fix rebaseEsteban Küber-3/+3
2023-01-05Explain error with `&mut self` for unsized trait implsclubby789-0/+27
2023-01-05review comments: rewordEsteban Küber-4/+4
2023-01-05Suggest changing argument on type errorEsteban Küber-10/+28
2023-01-05Account for type error on method arg caused by earlier inferenceEsteban Küber-0/+27
```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 ```
2023-01-05Tweak outputEsteban Küber-12/+124
- 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.
2023-01-05review comments: do not always point at init exprEsteban Küber-98/+11
2023-01-05More eagerly resolve expr `ty`s before writing themEsteban Küber-23/+11
This allows the expressions to have more accurate types when showing inference steps.
2023-01-05Skip macros to avoid talking about bindings the user can't seeEsteban Küber-12/+3
2023-01-05Point at expressions where inference refines an unexpected typeEsteban Küber-14/+140
Address #106355.
2023-01-05Auto merge of #106487 - GuillaumeGomez:fix-kbd-var, r=notriddlebors-2/+2
Fix --kbd-color variable name in rustdoc.css Interestingly enough, it only impacted the dark theme. Before: ![Screenshot from 2023-01-05 11-03-17](https://user-images.githubusercontent.com/3050060/210754145-c3bb0f50-d35f-4543-bf73-010a4524a803.png) After: ![Screenshot from 2023-01-05 11-03-05](https://user-images.githubusercontent.com/3050060/210754190-85c2f146-a774-4463-9cd3-9495b7c91bd7.png) r? `@notriddle`
2023-01-06Add regression test for #58355Yuki Okushi-0/+20
Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2023-01-05Add vendor to Fuchsia's target tripleDavid Koloski-85/+85
Historically, Rust's Fuchsia targets have been labeled x86_64-fuchsia and aarch64-fuchsia. However, they should technically contain vendor information. This CL changes Fuchsia's target triples to include the "unknown" vendor since Clang now does normalization and handles all triple spellings. This was previously attempted in #90510, which was closed due to inactivity.
2023-01-05Auto merge of #106406 - nikic:update-llvm-11, r=cuviperbors-0/+0
Update LLVM submodule Fixes #104099.
2023-01-05Update kbd GUI testGuillaume Gomez-1/+1
2023-01-05Fix --kbd-color variable name in rustdoc.cssGuillaume Gomez-1/+1
2023-01-05Auto merge of #106482 - compiler-errors:rollup-g7n1p39, r=compiler-errorsbors-208/+267
Rollup of 6 pull requests Successful merges: - #105846 (Account for return-position `impl Trait` in trait in `opt_suggest_box_span`) - #106385 (Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag) - #106403 (Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent`) - #106462 (rustdoc: remove unnecessary wrapper around sidebar and mobile logos) - #106464 (Update Fuchsia walkthrough with new configs) - #106478 (Tweak wording of fn call with wrong number of args) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-01-04Rollup merge of #106478 - estebank:tweak-fn-mismatch, r=compiler-errorsMichael Goulet-133/+133
Tweak wording of fn call with wrong number of args
2023-01-04Rollup merge of #106464 - djkoloski:update_fuchsia_platform_support_docs, ↵Michael Goulet-0/+3
r=tmandry Update Fuchsia walkthrough with new configs The new `download-ci-llvm` configuration option dosn't work with `lld = true` (see #100853). The Fuchsia walkthrough should recommend setting it to `false`. r? `@tmandry`
2023-01-04Rollup merge of #106462 - notriddle:notriddle/logo-container-sidebar, ↵Michael Goulet-18/+15
r=GuillaumeGomez rustdoc: remove unnecessary wrapper around sidebar and mobile logos This commit changes `.sidebar a:hover:not(.logo-container)` to add the `:not()` pseudo-class, retaining the old appearance of the logo when mousing over it. This didn't used to be necessary because the `a.sidebar-logo` was `display:inline`, and was what got the `background` changed on hover, while the `div.logo-container` inside it was `display:block`. This resulted in the hover rule not having any effect, because the logo-container box was not actually nested inside the sidebar-logo box: https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level > When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) are broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes (even if either side is empty), one on each side of the block-level box(es). The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes. When such an inline box is affected by relative positioning, any resulting translation also affects the block-level box contained in the inline box.
2023-01-04Rollup merge of #106403 - compiler-errors:rename-hir-methods, r=cjgillotMichael Goulet-25/+24
Rename `hir::Map::{get_,find_}parent_node` to `hir::Map::{,opt_}parent_id`, and add `hir::Map::{get,find}_parent` The `hir::Map::get_parent_node` function doesn't return a `Node`, and I think that's quite confusing. Let's rename it to something that sounds more like something that gets the parent hir id => `hir::Map::parent_id`. Same with `find_parent_node` => `opt_parent_id`. Also, combine `hir.get(hir.parent_id(hir_id))` and similar `hir.find(hir.parent_id(hir_id))` function into new functions that actually retrieve the parent node in one call. This last commit is the only one that might need to be looked at closely.
2023-01-04Rollup merge of #106385 - compiler-errors:new-solver-flag, r=jackh726Michael Goulet-32/+32
Split `-Zchalk` flag into `-Ztrait-solver=(classic|chalk|next)` flag We'll eventually need a way to select more than chalk + not-chalk. Does this need an MCP since it's touching a `-Z` flag? Or perhaps I should preserve `-Zchalk` for the time being... maybe I could make it a warning to use that flag? cc ``@rust-lang/types`` r? types
2023-01-04Rollup merge of #105846 - compiler-errors:issue-105838, r=jackh726Michael Goulet-0/+60
Account for return-position `impl Trait` in trait in `opt_suggest_box_span` RPITITs are the only types where their opaque bounds might normalize to some other self type than the opaque type itself. To avoid needing to do normalization, let's just match on either alias kind. Ideally, we'd just get rid of `opt_suggest_box_span`. It's kind of a wart on type-checking `if`/`match`. I've recently refactored this expression for being confusing/wrong, but moving it into the error path is pretty hard. Fixes #105838
2023-01-05Auto merge of #105409 - compiler-errors:closure-infer-cycle, r=jackh726bors-2/+111
Don't deduce a signature that makes a closure cyclic Sometimes when elaborating supertrait bounds for closure signature inference, we end up deducing a closure signature that is cyclical because either a parameter or the return type references a projection mentioning `Self` that also has escaping bound vars, which means that it's not eagerly replaced with an inference variable. Interestingly, this is not *just* related to my PR that elaborates supertrait bounds for closure signature deduction. The committed test `supertrait-hint-cycle-3.rs` shows **stable** code that is fixed by this PR: ```rust trait Foo<'a> { type Input; } impl<F: Fn(u32)> Foo<'_> for F { type Input = u32; } fn needs_super<F: for<'a> Fn(<F as Foo<'a>>::Input) + for<'a> Foo<'a>>(_: F) {} fn main() { needs_super(|_: u32| {}); } ``` Fixes #105401 Fixes #105396 r? types
2023-01-05Tweak wording of fn call with wrong number of argsEsteban Küber-133/+133
2023-01-04cleanup: handle -Zmutable-noalias like -Zbox-noaliasErik Desjardins-0/+23
2023-01-04Update rand in the stdlib tests, and remove the getrandom feature from itThom Chiovoloni-1/+0
2023-01-04Rollup merge of #106460 - c410-f3r:moar-errors, r=compiler-errorsMatthias Krüger-1/+1
Move tests r? `@petrochenkov`
2023-01-04Rollup merge of #106437 - notriddle:notriddle/http-url, r=GuillaumeGomezMatthias Krüger-3/+33
rustdoc: fix buggy JS check for absolute URL The old code did the wrong thing when faced with a crate named "http".
2023-01-04Rollup merge of #106412 - ↵Matthias Krüger-8/+44
GuillaumeGomez:fix-links-to-primitive-rustdoc-json, r=aDotInTheVoid Fix link generation for local primitive types in rustdoc JSON output Fixes https://github.com/rust-lang/rust/issues/104064. As mentioned in the issue, I'm not super happy about this fix which is more a hack rather than a sound-proof solution. However I couldn't find a better way to fix it. r? `@aDotInTheVoid`
2023-01-04Rollup merge of #106391 - ardislu:fix-popover-child-link, r=GuillaumeGomezMatthias Krüger-3/+9
rustdoc: allow popover child links to work No need to prevent default click behavior on a `<div>`, it will also disable all child click behavior. Closes #106390
2023-01-04Update Fuchsia walkthrough with new configsDavid Koloski-0/+3
The new `download-ci-llvm` configuration option dosn't work with `lld = true` (see #100853). The Fuchsia walkthrough should recommend setting it to `false`.
2023-01-04Remove unused match pattern for primitive typesGuillaume Gomez-1/+1
2023-01-04rustdoc: remove unnecessary wrapper around sidebar and mobile logosMichael Howell-18/+15
This commit changes `.sidebar a:hover:not(.logo-container)` to add the `:not()` pseudo-class, retaining the old appearance of the logo when mousing over it. This didn't used to be necessary because the `a.sidebar-logo` was `display:inline`, and was what got the `background` changed on hover, while the `div.logo-container` inside it was `display:block`. This resulted in the hover rule not having any effect, because the logo-container box was not actually nested inside the sidebar-logo box: https://www.w3.org/TR/CSS2/visuren.html#anonymous-block-level > When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) are broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes (even if either side is empty), one on each side of the block-level box(es). The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes. When such an inline box is affected by relative positioning, any resulting translation also affects the block-level box contained in the inline box.
2023-01-04Move testsCaio-1/+1
2023-01-04Rename stock solver to classicMichael Goulet-1/+1
2023-01-04Update tests, etcMichael Goulet-32/+32
2023-01-04adjust comments about pre-push.sh hookKaDiWa-3/+3
2023-01-04Update cargoWeihang Lo-0/+14
8 commits in 2381cbdb4e9b07090f552d34a44a529b6e620e44..8c460b2237a6359a7e3335890db8da049bdd62fc 2022-12-23 12:19:27 +0000 to 2023-01-04 14:30:01 +0000 - test: revive nightly plugin tests to work (rust-lang/cargo#11534) - Add note to release notes about rejecting multiple registries. (rust-lang/cargo#11531) - Fix a typo `fresheness` -&gt; `freshness` (rust-lang/cargo#11529) - Reasons for rebuilding (rust-lang/cargo#11407) - Asymmetric tokens (rust-lang/cargo#10771) - Use proper git URL for GitHub repos (rust-lang/cargo#11517) - Add `registry.default` example (rust-lang/cargo#11516) - Support vendoring with different revs from same git repo (rust-lang/cargo#10690) Also update license exceptions and permitted dependencies for new cargo dependency "pasetors". A new dependency `getrandom` is added into `rustc-workspace-hacks`, since it requires feature `js`.