about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2023-03-09Document the resulting values produced when using `From<bool>` on floatsbmoxb-1/+2
2023-03-09Auto merge of #108920 - matthiaskrgr:rollup-qrr9a0u, r=matthiaskrgrbors-461/+284
Rollup of 8 pull requests Successful merges: - #108754 (Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous) - #108759 (1.41.1 supported 32-bit Apple targets) - #108839 (Canonicalize root var when making response from new solver) - #108856 (Remove DropAndReplace terminator) - #108882 (Tweak E0740) - #108898 (Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap) - #108911 (Improve rustdoc-gui/tester.js code a bit) - #108916 (Remove an unused return value in `rustc_hir_typeck`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-09Auto merge of #108178 - cjgillot:ssa-deref, r=oli-obkbors-16/+294
Do not consider `&mut *x` as mutating `x` in `CopyProp` This PR removes an unfortunate overly cautious case from the current implementation. Found by https://github.com/rust-lang/rust/pull/105274 cc `@saethlin`
2023-03-08Auto merge of #108919 - matthiaskrgr:rollup-g271pm2, r=matthiaskrgrbors-165/+465
Rollup of 8 pull requests Successful merges: - #108686 (rustdoc: include link on all.html location header) - #108846 (StableMIR: Proof-of-concept implementation + test ) - #108873 (Simplify `sort_by` calls) - #108883 (Suppress copy impl error when post-normalized type references errors) - #108884 (Tweak illegal `Copy` impl message) - #108887 (Rename `MapInPlace` as `FlatMapInPlace`.) - #108901 (fix: evaluate with wrong obligation stack) - #108903 (Move Clippy tests back to their intended directory) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-08Rollup merge of #108916 - fmease:rm-unused-ret-val, r=compiler-errorsMatthias Krüger-8/+4
Remove an unused return value in `rustc_hir_typeck` Unused since #89580. Just something I noticed a while ago. `@rustbot` label C-cleanup
2023-03-08Rollup merge of #108911 - GuillaumeGomez:improve-rustdoc-gui-tester-code, ↵Matthias Krüger-23/+25
r=notriddle Improve rustdoc-gui/tester.js code a bit Just a small clean-up. r? `@notriddle`
2023-03-08Rollup merge of #108898 - ferrocene:pa-libc-check-cfg, r=Mark-SimulacrumMatthias Krüger-0/+9
Set `LIBC_CHECK_CFG=1` when building Rust code in bootstrap Downstream forks of the Rust compiler might want to use a custom `libc` to add support for targets that are not yet available upstream. Adding a patch to replace `libc` with a custom one would cause compilation errors though, because Cargo would interpret the custom `libc` as part of the workspace, and apply the check-cfg lints on it. Since https://github.com/rust-lang/libc/pull/3037, the `libc` build script emits check-cfg flags only when the `LIBC_CHECK_CFG` environment variable is set, so this PR allows the use of custom `libc`s.
2023-03-08Rollup merge of #108882 - compiler-errors:E0740, r=eholkMatthias Krüger-67/+101
Tweak E0740 Also drive-by suppress E0740 if it's an unresolved type.
2023-03-08Rollup merge of #108856 - Zeegomo:remove-drop-and-rep, r=tmiaskoMatthias Krüger-344/+33
Remove DropAndReplace terminator #107844 made DropAndReplace unused, let's remove it completely from the codebase.
2023-03-08Rollup merge of #108839 - compiler-errors:canonicalize-the-root-var, r=lcnrMatthias Krüger-15/+104
Canonicalize root var when making response from new solver During trait solving, if we equate two inference variables `?0` and `?1` but don't equate them with any rigid types, then `InferCtxt::probe_ty_var` will return `Err` for both of these. The canonicalizer code will then canonicalize the variables independently(!), and the response will not reflect the fact that these two variables have been made equal. This hinders inference and I also don't think it's sound? I haven't thought too much about it past that, so let's talk about it. r? ``@lcnr``
2023-03-08Rollup merge of #108759 - ↵Matthias Krüger-1/+3
workingjubilee:pedantically-correct-release-notes-for-1.41.1-apple32, r=Mark-Simulacrum 1.41.1 supported 32-bit Apple targets This question was raised by #108556.
2023-03-08Rollup merge of #108754 - compiler-errors:retry, r=oli-obkMatthias Krüger-3/+5
Retry `pred_known_to_hold_modulo_regions` with fulfillment if ambiguous Fixes #108721 The problem here is that when we're checking `is_sized_raw` during codegen on some type that has a lot of opaques in it, something emits several nested obligations that are individually ambiguous, but when processed together in a loop then apply modulo regions. Since the `evaluate_predicates_recursively` inner loop doesn't process predicates until they stop changing, we return `EvaluatedToAmbig`, which makes the sized check return false incorrectly. See: https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/traits/select/mod.rs#L596-L606 ... Compared to the analogous loop in the new solver: https://github.com/rust-lang/rust/blob/f15f0ea73972786e426732c5b92ba9a904b866c4/compiler/rustc_trait_selection/src/solve/mod.rs#L481-L512 To fix this, if we get ambiguous during `pred_known_to_hold_modulo_regions`, just retry the obligation in a fulfillment context. -- Unfortunately... I don't have a test for this. I've only tested this locally. Pending minimization :/ r? types
2023-03-08Rollup merge of #108903 - rust-lang:pa-fix-clippy-tests, r=flip1995Matthias Krüger-0/+0
Move Clippy tests back to their intended directory See https://github.com/rust-lang/rust/pull/108674#issuecomment-1459736086. r? `@flip1995`
2023-03-08Rollup merge of #108901 - LYF1999:yf/108897, r=lcnrMatthias Krüger-2/+47
fix: evaluate with wrong obligation stack fix #108897 r? ``@lcnr``
2023-03-08Rollup merge of #108887 - nnethercote:rename-MapInPlace, r=lqdMatthias Krüger-15/+8
Rename `MapInPlace` as `FlatMapInPlace`. After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration. r? ``@lqd``
2023-03-08Rollup merge of #108884 - compiler-errors:tweak-illegal-copy-impl-message, ↵Matthias Krüger-62/+62
r=WaffleLapkin Tweak illegal `Copy` impl message The phrase "may not" can both mean "is not able to" and "possibly does not". Disambiguate this by just using "cannot". ``@Lokathor`` expressed being annoyed by this [here](https://twitter.com/Lokathor/status/1633200313544089602?s=20). Also drive-by fix for this extremely noisy message: https://play.rust-lang.org/?version=stable&mode=debug&edition=2021&gist=6a37275bc810f7846bfe191845b7d11d. r? diagnostics
2023-03-08Rollup merge of #108883 - compiler-errors:post-norm-copy-err, r=BoxyUwUMatthias Krüger-1/+49
Suppress copy impl error when post-normalized type references errors Suppress spurious errors from the `Copy` impl validity check when fields have bad types *post*-normalization, instead of just pre-normalization. ---- The const-generics test regressed recently due to #107965, cc `````@BoxyUwU.````` * I think it's because `[_; 0u32]: Copy` now fails to hold because a nested obligation `ConstArgHasType(0u32, usize)` fails. * It's interesting that `[const_error]` shows up in the type only after normalization, though, but I'm pretty sure that it's due to the evaluate call that happens when normalizing unevaluated consts.
2023-03-08Rollup merge of #108873 - WaffleLapkin:cmp, r=cjgillotMatthias Krüger-16/+10
Simplify `sort_by` calls small cleanup
2023-03-08Rollup merge of #108846 - celinval:smir-poc, r=oli-obkMatthias Krüger-66/+274
StableMIR: Proof-of-concept implementation + test This PR is part of the [project Stable MIR](https://github.com/rust-lang/project-stable-mir). The PR deletes old re-exports from rustc_smir and introduces a proof-of-concept implementation for APIs to retrieve crate information. The implementation follows the [design described here](https://hackmd.io/XhnYHKKuR6-LChhobvlT-g?view), but instead of using separate crates for the implementation, it uses separate modules inside `rustc_smir`. The API introduced at this point should be seen just as an example on how we are planning to structure the communication between tools and the compiler. I have not explored yet what should be the right granularity, the best starting point for users, neither the best way to implement it. r? ``````@oli-obk``````
2023-03-08Rollup merge of #108686 - notriddle:notriddle/jank-all, r=jshaMatthias Krüger-3/+15
rustdoc: include link on all.html location header This avoids a subtle layout shift when switching from the crate page to all items. ## Before | index.html | all.html | |------------|----------| | ![image](https://user-images.githubusercontent.com/1593513/222607866-4eac3f55-314c-4273-9664-503f2a79ad0a.png) | ![image](https://user-images.githubusercontent.com/1593513/222607895-2d6bac3b-f66a-47d4-b234-360f6f8e1ee3.png) | ## After | index.html | all.html | |------------|----------| | ![image](https://user-images.githubusercontent.com/1593513/222607866-4eac3f55-314c-4273-9664-503f2a79ad0a.png) | ![image](https://user-images.githubusercontent.com/1593513/222607997-e72c48a0-02c7-42a7-80c2-cd6bed48bd15.png) |
2023-03-08Auto merge of #108665 - weihanglo:update-cargo, r=weihanglobors-59/+730
Update cargo 25 commits in 9880b408a3af50c08fab3dbf4aa2a972df71e951..7d3033d2e59383fd76193daf9423c3d141972a7d 2023-02-28 19:39:39 +0000 to 2023-03-08 17:05:08 +0000 - Revert "rust-lang/cargo#11738" - Use test name for dir when running tests (rust-lang/cargo#11812) - Update CHANGELOG for 1.68 backports (rust-lang/cargo#11810) - Add `CARGO_PKG_README` (rust-lang/cargo#11645) - path dependency: fix cargo-util version (rust-lang/cargo#11807) - Adding display of which target failed to compile (rust-lang/cargo#11636) - Fix `CARGO_CFG_` vars for configs defined both with and without value (rust-lang/cargo#11790) - Breaking endless loop on cyclic features in added dependency in cargo-add (rust-lang/cargo#11805) - Enhance the doc of timing report with graphs (rust-lang/cargo#11798) - Make `sparse` the default protocol for crates.io (rust-lang/cargo#11791) - Use sha2 to calculate SHA256 (rust-lang/cargo#11795) - gitoxide progress bar fixes (rust-lang/cargo#11800) - Check publish_to_alt_registry publish content (rust-lang/cargo#11799) - chore: fix missing files in autolabel trigger_files (rust-lang/cargo#11797) - chore: Update base64 (rust-lang/cargo#11796) - Fix some doc typos (rust-lang/cargo#11794) - chore(ci): Enforce cargo-deny in CI (rust-lang/cargo#11761) - Some cleanup for unstable docs (rust-lang/cargo#11793) - gitoxide integration: fetch (rust-lang/cargo#11448) - patch can conflict on not activated packages (rust-lang/cargo#11770) - fix(toml): Provide a way to show unused manifest keys for dependencies (rust-lang/cargo#11630) - Improve error for missing crate in --offline mode for sparse index (rust-lang/cargo#11783) - feat(resolver): `-Zdirect-minimal-versions` (rust-lang/cargo#11688) - feat: Use test name for dir when running tests (rust-lang/cargo#11738) - Jobserver cleanup (rust-lang/cargo#11764) - Fix help string for "--charset" option of "cargo tree" (rust-lang/cargo#11785) --- ~~This update is primarily for making rust-lang/cargo#11630 into 1.69~~ (will file a beta backport then). However, just look into the licenses and dependencies permitted list, it looks a bit unfortunate but inevitable I guess? r? `@ehuss` cc `@Muscraft`
2023-03-08Improve rustdoc-gui/tester.js code a bitGuillaume Gomez-23/+25
2023-03-08Update cargoWeihang Lo-0/+0
2 commits in 1334b059c6dcceab3c10c81413f79bb832c8d9d..7d3033d2e59383fd76193daf9423c3d141972a7d 2023-03-07 19:21:50 +0000 to 2023-03-08 17:05:08 +0000 - Revert "rust-lang/cargo#11738" - Use test name for dir when running tests (rust-lang/cargo#11812) - Update CHANGELOG for 1.68 backports (rust-lang/cargo#11810)
2023-03-08clean-up: remove unused return value in typeckLeón Orell Valerian Liehr-8/+4
2023-03-08move clippy tests back to their intended directoryPietro Albini-0/+0
2023-03-08Auto merge of #108121 - aliemjay:resolve-var-region, r=lcnrbors-71/+86
always resolve to universal regions if possible `RegionConstraintCollector::opportunistic_resolve_var`, which is used in canonicalization and projection logic, doesn't resolve the region var to an equal universal region. So if we have equated `'static == '1 == '2`, it doesn't resolve `'1` or `'2` to `'static`. Now it does! Addresses review comment https://github.com/rust-lang/rust/pull/107376#discussion_r1093233687. r? `@lcnr`
2023-03-08fix: evaluate with wrong obligation stackyifei-2/+47
2023-03-08prefer universal from lower universeAli MJ Al-Nasrawy-1/+17
In case a variable is unified with two universal regions from different universes, use the one with the lower universe as it has a higher chance of being compatible with the variable.
2023-03-08set LIBC_CHECK_CFG=1 when building Rust code in bootstrapPietro Albini-0/+9
2023-03-08address review commentAli MJ Al-Nasrawy-7/+23
2023-03-08Auto merge of #108534 - Mark-Simulacrum:compression, r=pietroalbinibors-9/+4437
Import rust-installer & adjust compression settings This brings in rust-lang/rust-installer#123, which enables a larger compression window (8 -> 64MB) amongst other changes to the xz compression settings. The net effect should be smaller compressed tarballs which will decrease bandwidth usage for static.rust-lang.org, download times, and decompression time. This comes at the cost of higher baseline requirements for running rustup to use these files, which we believe should be largely acceptable (running rustc is likely to use at least this much memory) but if we get specific reports we may explore options to decrease impact (e.g., using the gzip tarballs automatically in rustup). To simplify iteration on compression settings this also imports the rust-lang/rust-installer submodule, it is now hosted fully inside rust-lang/rust. Once we land this I'll file a followup to add a note to that repo and we can subsequently archive it. -- CI times for dist-x86_64-linux builds: * threads=6, master - 2h 50m * threads=1, new - 3h 40m * threads=6, new - 2h 50m
2023-03-08Auto merge of #108312 - michaelwoerister:hash-set-not-hash-stable, r=eholkbors-103/+127
Do not implement HashStable for HashSet (MCP 533) This PR removes all occurrences of `HashSet` in query results, replacing it either with `FxIndexSet` or with `UnordSet`, and then removes the `HashStable` implementation of `HashSet`. This is part of implementing [MCP 533](https://github.com/rust-lang/compiler-team/issues/533), that is, removing the `HashStable` implementations of all collection types with unstable iteration order. The changes are mostly mechanical. The only place where additional sorting is happening is in Miri's override implementation of the `exported_symbols` query.
2023-03-08Rename `MapInPlace` as `FlatMapInPlace`.Nicholas Nethercote-15/+8
After removing the `map_in_place` method, which isn't much use because modifying every element in a collection such as a `Vec` can be done trivially with iteration.
2023-03-08Tweak E0740Michael Goulet-66/+81
2023-03-08Don't report E0740 for type errorMichael Goulet-1/+20
2023-03-08Suppress copy impl error when post-normalized type references errorsMichael Goulet-1/+49
2023-03-08Dedup copy field errors for identical typesMichael Goulet-8/+8
2023-03-08may not => cannotMichael Goulet-54/+54
2023-03-07Update cargoWeihang Lo-59/+730
23 commits in 9880b408a3af50c08fab3dbf4aa2a972df71e951..c1334b059c6dcceab3c10c81413f79bb832c8d9d 2023-02-28 19:39:39 +0000 to 2023-03-07 19:21:50 +0000 - Add `CARGO_PKG_README` (rust-lang/cargo#11645) - path dependency: fix cargo-util version (rust-lang/cargo#11807) - Adding display of which target failed to compile (rust-lang/cargo#11636) - Fix `CARGO_CFG_` vars for configs defined both with and without value (rust-lang/cargo#11790) - Breaking endless loop on cyclic features in added dependency in cargo-add (rust-lang/cargo#11805) - Enhance the doc of timing report with graphs (rust-lang/cargo#11798) - Make `sparse` the default protocol for crates.io (rust-lang/cargo#11791) - Use sha2 to calculate SHA256 (rust-lang/cargo#11795) - gitoxide progress bar fixes (rust-lang/cargo#11800) - Check publish_to_alt_registry publish content (rust-lang/cargo#11799) - chore: fix missing files in autolabel trigger_files (rust-lang/cargo#11797) - chore: Update base64 (rust-lang/cargo#11796) - Fix some doc typos (rust-lang/cargo#11794) - chore(ci): Enforce cargo-deny in CI (rust-lang/cargo#11761) - Some cleanup for unstable docs (rust-lang/cargo#11793) - gitoxide integration: fetch (rust-lang/cargo#11448) - patch can conflict on not activated packages (rust-lang/cargo#11770) - fix(toml): Provide a way to show unused manifest keys for dependencies (rust-lang/cargo#11630) - Improve error for missing crate in --offline mode for sparse index (rust-lang/cargo#11783) - feat(resolver): `-Zdirect-minimal-versions` (rust-lang/cargo#11688) - feat: Use test name for dir when running tests (rust-lang/cargo#11738) - Jobserver cleanup (rust-lang/cargo#11764) - Fix help string for "--charset" option of "cargo tree" (rust-lang/cargo#11785) Note that some 3rd-party licensing allowed list changed due to the introducion of `gix` dependency
2023-03-07Auto merge of #108877 - matthiaskrgr:rollup-7gwgvgc, r=matthiaskrgrbors-1161/+5893
Rollup of 7 pull requests Successful merges: - #108460 (migrate `rustc_hir_analysis` to session diagnostic [Part Two]) - #108581 (Add a new config flag, dist.include-mingw-linker.) - #108583 (Account for binders correctly when adding default RPITIT method assumption) - #108783 (Sync rustc_codegen_gcc 2023/03/04) - #108793 (Append to existing `PYTHONPATH` in compiletest instead of overwriting) - #108822 (Remove references to PassManagerBuilder) - #108866 (Force to use the stage 2 compiler when config.download_rustc is set) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-07Change item collection to be on demandCelina G. Val-33/+38
2023-03-07remove leftover commentGiacomo Pasini-3/+0
2023-03-07Rollup merge of #108866 - Kohei316:master, r=ozkanonurMatthias Krüger-2/+13
Force to use the stage 2 compiler when config.download_rustc is set Fixes #108768
2023-03-07Rollup merge of #108822 - nikic:legacy-pm-removal-2, r=cuviperMatthias Krüger-5/+0
Remove references to PassManagerBuilder This is a legacy PM concept that we no longer use.
2023-03-07Rollup merge of #108793 - clubby789:pythonpath-compiletest, r=compiler-errorsMatthias Krüger-2/+12
Append to existing `PYTHONPATH` in compiletest instead of overwriting Fixes #108779
2023-03-07Rollup merge of #108783 - antoyo:sync-cg_gcc-2023-03-04, r=cjgillotMatthias Krüger-1121/+5741
Sync rustc_codegen_gcc 2023/03/04 Hi. This sync all the changes from rustc_codegen_gcc. Thanks for the review.
2023-03-07Rollup merge of #108583 - ↵Matthias Krüger-1/+49
compiler-errors:rpitit-default-method-with-nested-rpitits, r=spastorino Account for binders correctly when adding default RPITIT method assumption As of #108203, we install extra projection predicates into the param-env of a default trait method when it has return-position `impl Trait` (or is async). The implementation didn't account for the fact that it's walking into and out of binders, so we just need to shift all the debruijn indices accordingly when constructing the projection predicates. Fixes #108579 r? types
2023-03-07Rollup merge of #108581 - jfgoog:include-mingw-linker, r=petrochenkovMatthias Krüger-2/+10
Add a new config flag, dist.include-mingw-linker. The flag controls whether to copy the linker, DLLs, and various libraries from MinGW into the rustc toolchain. It applies only when the host or target is pc-windows-gnu. The flag is true by default to preserve existing behavior.
2023-03-07Rollup merge of #108460 - obeis:hir-analysis-migrate-diagnostics-2, ↵Matthias Krüger-28/+68
r=compiler-errors migrate `rustc_hir_analysis` to session diagnostic [Part Two] migrate `rustc_hir_analysis` to session diagnostic (part two) files list: - rustc_hir_analysis/variance/* - rustc_hir_analysis/missing_cast_for_variadic_arg.rs - rustc_hir_analysis/sized_unsized_cast.rs Updates #100717
2023-03-07Auto merge of #108167 - Zoxc:query-config-instance-slim, r=cjgillotbors-126/+186
Make `rustc_query_system` take `QueryConfig` by instance. This allows for easy switching between virtual tables and specialized instances for queries. It also has the benefit of less turbofish. `QueryStorage` has also been merged with `QueryCache`. Split out from https://github.com/rust-lang/rust/pull/107937. r? `@cjgillot`