about summary refs log tree commit diff
path: root/compiler
AgeCommit message (Collapse)AuthorLines
2023-03-21Do not suggest bounds restrictions for synthesized RPITITsSantiago Pastorino-0/+1
2023-03-20Auto merge of #109384 - matthiaskrgr:rollup-hu348gs, r=matthiaskrgrbors-40/+60
Rollup of 8 pull requests Successful merges: - #109170 (Set `CMAKE_SYSTEM_NAME` for Linux targets) - #109266 (rustdoc: Correctly merge import's and its target's docs in one more case) - #109267 (Add tests for configure.py) - #109273 (Make `slice::is_sorted_by` implementation nicer) - #109277 (Fix generics_of for impl's RPITIT synthesized associated type) - #109307 (Ignore `Inlined` spans when computing caller location.) - #109364 (Only expect a GAT const param for `type_of` of GAT const arg) - #109365 (Update mdbook) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2023-03-20Auto merge of #108524 - Zoxc:node-backtrace, r=cjgillotbors-51/+64
Optimize dep node backtrace and ignore fatal errors This attempts to optimize https://github.com/rust-lang/rust/pull/91742 while also passing through fatal errors. r? `@cjgillot`
2023-03-20Rollup merge of #109364 - compiler-errors:gat-const-arg, r=BoxyUwUMatthias Krüger-28/+40
Only expect a GAT const param for `type_of` of GAT const arg IDK why we were account for both `is_ty_or_const` instead of just for a const param, since we're computing the `type_of` a const param specifically. Fixes #109300
2023-03-20Rollup merge of #109307 - cjgillot:inline-location, r=compiler-errorsMatthias Krüger-3/+11
Ignore `Inlined` spans when computing caller location. Fixes https://github.com/rust-lang/rust/issues/105538
2023-03-20Rollup merge of #109277 - spastorino:new-rpitit-14, r=compiler-errorsMatthias Krüger-9/+9
Fix generics_of for impl's RPITIT synthesized associated type The only useful commit is the last one. This makes `generics_of` for the impl side RPITIT copy from the trait's associated type and avoid the fn on the impl side which was previously wrongly used. This solution is better but we still need to fix resolution of the generated generics. r? ``@compiler-errors``
2023-03-20Rollup merge of #109370 - DaniPopes:issue-109334, r=NilstriebMatthias Krüger-13/+10
fix ClashingExternDeclarations lint ICE Fixes #109334 First "real" contribution, please let me know if I did something wrong. As I understand it, it's OK if a `#[repr(transparent)]` type has no non-zero sized types (aka is a ZST itself) and the function should just return the type normally instead of panicking r? `@Nilstrieb`
2023-03-20Rollup merge of #109362 - nnethercote:split-meta-stats-items, r=bjorn3Matthias Krüger-4/+3
Split `items` from `-Zmeta-stats` in two. Because it's one of the biggest sections. r? `@bjorn3`
2023-03-20Rollup merge of #109301 - Ezrashaw:fix-ctf-ice, r=NilstriebMatthias Krüger-2/+24
fix: fix ICE in `custom-test-frameworks` feature Fixes #107454 Simple fix to emit error instead of ICEing. At some point, all the code in `tests.rs` should be refactored, there is a bit of duplication (this PR's code is repeated five times over lol). r? `@Nilstrieb` (active on the linked issue?)
2023-03-20Rollup merge of #109249 - compiler-errors:new-rpitit-comments, r=spastorinoMatthias Krüger-32/+47
Update names/comments for new return-position impl trait in trait lowering strategy r? `@spastorino` totally cosmetic
2023-03-20Update some names and commentsMichael Goulet-32/+47
2023-03-20Auto merge of #108148 - parthopdas:master, r=oli-obkbors-11/+47
Implementing "<test_binary> --list --format json" for use by IDE test explorers / runners Fixes #107307 PR 1 of 2 - wiring up just the new information + implement the command line changes i.e. --format json + tests upcoming: PR 2 of 2 - clean up "#[cfg(not(bootstrap))]" from PR 1 As per the discussions on - MCP: https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/Implementing.20.22.3Ctest_binary.3E.20--list.20--form.E2.80.A6.20compiler-team.23592/near/328747548 - preRFC: https://internals.rust-lang.org/t/pre-rfc-implementing-test-binary-list-format-json-for-use-by-ide-test-explorers-runners/18308 - FYI on Discord: https://discord.com/channels/442252698964721669/459149169546887178/1075581549409484820
2023-03-20remove bad commentDaniPopes-1/+0
2023-03-20fix ClashingExternDeclarations lint ICEDaniPopes-13/+11
2023-03-19Reformat type_ofMichael Goulet-23/+30
2023-03-19Only expect a GAT const argMichael Goulet-5/+10
2023-03-20Split `items` from `-Zmeta-stats` in two.Nicholas Nethercote-4/+3
Because it's one of the biggest sections.
2023-03-19Rollup merge of #109324 - cjgillot:fixed-unused-params, r=NilstriebDylan DPC-14/+43
Implement FixedSizeEncoding for UnusedGenericParams. Using a `Lazy` for actually a `u32` value is 50% overhead, so let's encode the bitset directly.
2023-03-19Rollup merge of #109243 - chenyukang:yukang/fix-ice-109144, r=petrochenkovDylan DPC-56/+59
The name of NativeLib will be presented Fixes #109144 I was working on a quick fix, but found change the name from `Option<Symbol>` to `Symbol` make life a little bit easier.
2023-03-19Rollup merge of #109212 - Ezrashaw:no-similar-sugg-for-unstable, r=estebankDylan DPC-0/+9
fix: don't suggest similar method when unstable Fixes #109177 Don't display typo suggestions for unstable things, unless the feature flag is enabled. AFAIK, there are two places this occurs: - `rustc_resolve`: before type checking, effectively just `FnCtxt::Free`. - `rustc_hir_typck`: during type checking, for `FnCtxt::Assoc(..)`s. The linked issue is about the latter, obviously the issue is applicable to both. r? `@estebank`
2023-03-19Rollup merge of #109003 - GuillaumeGomez:useless-anonymous-reexport-lint, ↵Dylan DPC-0/+96
r=cjgillot Add `useless_anonymous_reexport` lint This is a follow-up of https://github.com/rust-lang/rust/pull/108936. We once again show all anonymous re-exports in rustdoc, however we also wanted to add a lint to let users know that it very likely doesn't have the effect they think it has.
2023-03-19Rollup merge of #105793 - lukas-code:circular-deps, r=Mark-SimulacrumDylan DPC-7/+14
Add note for mismatched types because of circular dependencies If you have crate A with a dependency on crate B, and crate B with a dev-dependency on A, then you might see "mismatched types" errors on types that seem to be equal. This PR adds a note that explains that the types are different, because crate B is compiled twice, one time with `cfg(test)` and one time without. I haven't found a good way to create circular dependencies in UI tests, so I abused the incremental tests instead. As a bonus, incremental tests support "cpass" now. related to https://github.com/rust-lang/rust/issues/22750
2023-03-19fix: fix ICE in `custom-test-frameworks` featureEzra Shaw-2/+24
2023-03-19The name of NativeLib will be presentedyukang-56/+58
2023-03-18Implement FixedSizeEncoding for UnusedGenericParams.Camille GILLOT-14/+43
2023-03-18Ignore `Inlined` spans when computing caller location.Camille GILLOT-3/+11
2023-03-18Rollup merge of #109287 - scottmcm:hash-slice-size-of-val, r=oli-obkMatthias Krüger-1/+1
Use `size_of_val` instead of manual calculation Very minor thing that I happened to notice in passing, but it's both shorter and [means it gets `mul nsw`](https://rust.godbolt.org/z/Y9KxYETv5), so why not.
2023-03-18Rollup merge of #109238 - spastorino:new-rpitit-12, r=compiler-errorsMatthias Krüger-0/+11
Fix generics mismatch errors for RPITITs on -Zlower-impl-trait-in-trait-to-assoc-ty This PR stops reporting errors due to different count of generics on the new synthesized associated types for RPITITs. Those were already reported when we compare the function on the triat with the function on the impl. r? ``@compiler-errors``
2023-03-18Rollup merge of #109234 - tmiasko:overflow-checks, r=cjgillotMatthias Krüger-40/+18
Tweak implementation of overflow checking assertions Extract and reuse logic controlling behaviour of overflow checking assertions instead of duplicating it three times. r? `@cjgillot`
2023-03-18Rollup merge of #108772 - jyn514:faster-tidy, r=the8472Matthias Krüger-24/+46
Speed up tidy quite a lot I highly recommend reviewing this commit-by-commit. Based on #106440 for convenience. ## Timings These were collected by running `x test tidy -v` to copy paste the command, then using [`samply record`](https://github.com/mstange/samply). before (8 threads) ![image](https://user-images.githubusercontent.com/23638587/222965319-352ad2c8-367c-4d74-960a-e4bb161a6aff.png) after (8 threads) ![image](https://user-images.githubusercontent.com/23638587/222965323-fa846f4e-727a-4bf8-8e3b-1b7b40505cc3.png) before (64 threads) ![image](https://user-images.githubusercontent.com/23638587/222965302-dc88020c-19e9-49d9-a87d-cad054d717f3.png) after (64 threads) ![image](https://user-images.githubusercontent.com/23638587/222965335-e73d7622-59de-41d2-9cc4-1bd67042a349.png) The last commit makes tidy use more threads, so comparing "before (8 threads)" to "after (64 threads)" is IMO the most realistic comparison. Locally, that brings the time for me to run tidy down from 4 to .9 seconds, i.e. the majority of the time for `x test tidy` is now spend running `fmt --check`. r? `@the8472`
2023-03-18Rollup merge of #107416 - czzrr:issue-80618, r=GuillaumeGomezMatthias Krüger-1/+66
Error code E0794 for late-bound lifetime parameter error. This PR addresses [#80618](https://github.com/rust-lang/rust/issues/80618).
2023-03-18Auto merge of #108815 - the8472:process-obligations-fast-skip, r=nnethercotebors-4/+77
fast path for process_obligations Speeds up `keccak` and `cranelift-codegen` in perf.rlo.
2023-03-18address review commentsJoshua Nelson-24/+46
2023-03-18fix: don't suggest similar method when unstableEzra Shaw-0/+9
2023-03-17Use `size_of_val` instead of manual calculationScott McMurray-1/+1
Very minor thing that I happened to notice in passing, but it's both shorter and means it gets `mul nuw`, so why not.
2023-03-18Rollup merge of #109257 - petrochenkov:bindebug, r=WaffleLapkinMatthias Krüger-4/+12
resolve: Improve debug impls for `NameBinding` Print at least the Some/None/Ok/Err status of the nested bindings if not the bindings themselves. Noticed while reviewing https://github.com/rust-lang/rust/pull/108729.
2023-03-18Rollup merge of #109251 - MU001999:master, r=NilstriebMatthias Krüger-6/+18
Suggest surrounding the macro with `{}` to interpret as a statement Fixes #109237
2023-03-18Rollup merge of #109248 - compiler-errors:get_fn_decl-aaa, r=WaffleLapkinMatthias Krüger-36/+53
Pass the right HIR back from `get_fn_decl` Fixes #109232 Makes sure that the `fn_id: HirId` that we pass to `suggest_missing_return_type` matches up with the `fn_decl: hir::FnDecl` that we pass to it, so the late-bound vars that we fetch from the former match up with the types in the latter... This HIR suggestion code really needs a big refactor. I've tried to do it in the past (a couple of attempts), but it's a super tangled mess. It really shouldn't be passing around things like `hir::Node` and just deal with `LocalDefId`s everywhere... Anyways, I'd rather fix this ICE, now.
2023-03-18Rollup merge of #109222 - chenyukang:yukang/fix-109143, r=petrochenkovMatthias Krüger-2/+3
Do not ICE for unexpected lifetime with ConstGeneric rib Fixes #109143 r? ````@petrochenkov```` Combining this test with the previous test will affect the previous diagnostics, so I added a separate test case.
2023-03-18Rollup merge of #109211 - mili-l:mili_l/update_e0206_description, r=WaffleLapkinMatthias Krüger-4/+4
E0206 - update description added `union` to description
2023-03-18Rollup merge of #109200 - compiler-errors:issue-109191, r=WaffleLapkinMatthias Krüger-3/+6
Fix index out of bounds in `suggest_trait_fn_ty_for_impl_fn_infer` Fixes #109191
2023-03-18Rollup merge of #109102 - compiler-errors:ambig-assoc-in-non-lt-binder, ↵Matthias Krüger-3/+14
r=jackh726 Erase escaping late-bound regions when probing for ambiguous associated types Fixes #109090
2023-03-17Fix generics_of for impl's RPITIT synthesized associated typeSantiago Pastorino-7/+3
2023-03-17Fix impl_trait_ty_to_ty substsSantiago Pastorino-2/+6
2023-03-17Auto merge of #108862 - Mark-Simulacrum:bootstrap-bump, r=pietroalbinibors-4/+4
Bump bootstrap compiler to 1.69 beta r? `@pietroalbini`
2023-03-17Fast path that skips over unchanged obligations in process_obligationsThe 8472-4/+77
- only borrow the refcell once per loop - avoid complex matches to reduce branch paths in the hot loop - use a by-ref fast path that avoids mutations at the expense of having false negatives
2023-03-17Fix generics mismatch errors for RPITITs on ↵Santiago Pastorino-0/+11
-Zlower-impl-trait-in-trait-to-assoc-ty
2023-03-17Pass the right HIR back from get_fn_declMichael Goulet-36/+53
2023-03-17Erase escaping late-bound regions when probing for ambiguous associated typesMichael Goulet-3/+14
2023-03-17Auto merge of #109253 - matthiaskrgr:rollup-2xmv5zk, r=matthiaskrgrbors-132/+175
Rollup of 8 pull requests Successful merges: - #108958 (Remove box expressions from HIR) - #109044 (Prevent stable `libtest` from supporting `-Zunstable-options`) - #109155 (Fix riscv64 fuchsia LLVM target name) - #109156 (Fix linker detection for clang with prefix) - #109181 (inherit_overflow: adapt pattern to also work with v0 mangling) - #109198 (Install projection from RPITIT to default trait method opaque correctly) - #109215 (Use sort_by_key instead of sort_by) - #109229 (Fix invalid markdown link references) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup