about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2024-01-13std: move personality implementation out of PALjoboet-1/+2
2024-01-13Auto merge of #117285 - joboet:move_platforms_to_pal, r=ChrisDentonbors-209/+215
Move platform modules into `sys::pal` This is the initial step of #117276. `sys` just re-exports everything from the current `sys` for now, I'll move the implementations for the individual features one-by-one after this PR merges.
2024-01-13don't break a good linkjoboet-1/+1
Co-authored-by: klensy <klensy@users.noreply.github.com>
2024-01-13Auto merge of #119871 - nnethercote:overhaul-treat-err-as-bug, r=compiler-errorsbors-68/+51
Overhaul `-Ztreat-err-as-bug` It's current behaviour is surprising, in a bad way. This also makes the implementation more complex than it needs to be. r? `@oli-obk`
2024-01-13Auto merge of #119473 - Urgau:check-cfg-explicit-none, r=petrochenkovbors-6/+101
Add explicit `none()` value variant in check-cfg This PR adds an explicit none value variant in check-cfg values: `values(none())`. Currently the only way to define the none variant is with an empty `values()` which means that if someone has a cfg that takes none and strings they need to use two invocations: `--check-cfg=cfg(foo) --check-cfg=cfg(foo, values("bar"))`. Which would now be `--check-cfg=cfg(foo, values(none(),"bar"))`, this is simpler and easier to understand. `--check-cfg=cfg(foo)`, `--check-cfg=cfg(foo, values())` and `--check-cfg=cfg(foo, values(none()))` would be equivalent. *Another motivation for doing this is to make empty `values()` actually means no-values, but this is orthogonal to this PR and adding `none()` is sufficient in it-self.* `@rustbot` label +F-check-cfg r? `@petrochenkov`
2024-01-13Auto merge of #118947 - Bryanskiy:delegStep1, r=petrochenkov,lcnrbors-93/+1634
Delegation implementation: step 1 See https://github.com/rust-lang/rust/issues/118212 for more details. r? `@petrochenkov`
2024-01-13Auto merge of #118924 - Urgau:check-cfg-exclude-well-known-from-diag, ↵bors-39/+15
r=petrochenkov Exclude well known names from showing a suggestion in check-cfg This PR adds an exclusion for well known names from showing in suggestions of check-cfg/`unexpected_cfgs`. Follow-up to https://github.com/rust-lang/rust/pull/118213 and fixes https://github.com/rust-lang/rust/pull/118213#issuecomment-1854189934. r? `@petrochenkov`
2024-01-13Auto merge of #119909 - weihanglo:update-cargo, r=weihanglobors-0/+0
Update cargo 8 commits in 3e428a38a34e820a461d2cc082e726d3bda71bcb..84976cd699f4aea56cb3a90ce3eedeed9e20d5a5 2024-01-09 20:46:36 +0000 to 2024-01-12 15:55:43 +0000 - fix(resolver): do not panic when sorting empty summaries (rust-lang/cargo#13287) - Implementation of shallow libgit2 fetches behind an unstable flag (rust-lang/cargo#13252) - Add documentation entry for unstable `--output-format` flag (rust-lang/cargo#13284) - doc: add `public` info in `cargo-add` man page. (rust-lang/cargo#13272) - More docs on prerelease compat (rust-lang/cargo#13286) - Add unstable `--output-format` option to `cargo rustdoc` (rust-lang/cargo#12252) - feat: Add `rustc` style errors for manifest parsing (rust-lang/cargo#13172) - Document why `du` function uses mutex (rust-lang/cargo#13273) r? ghost
2024-01-13Don't consider delayed bugs for `-Ztreat-err-as-bug`.Nicholas Nethercote-68/+51
`-Ztreat-err-as-bug` treats normal errors and delayed bugs equally, which can lead to some really surprising results. This commit changes `-Ztreat-err-as-bug` so it ignores delayed bugs, unless they get promoted to proper bugs and are printed. This feels to me much simpler and more logical. And it simplifies the implementation: - The `-Ztreat-err-as-bug` check is removed from in `DiagCtxt::{delayed_bug,span_delayed_bug}`. - `treat_err_as_bug` doesn't need to count delayed bugs. - The `-Ztreat-err-as-bug` panic message is simpler, because it doesn't have to mention delayed bugs. Output of delayed bugs is now more consistent. They're always printed the same way. Previously when they triggered `-Ztreat-err-as-bug` they would be printed slightly differently, via `span_bug` in `span_delayed_bug` or `delayed_bug`. A minor behaviour change: the "no errors encountered even though `span_delayed_bug` issued" printed before delayed bugs is now a note rather than a bug. This is done so it doesn't get counted as an error that might trigger `-Ztreat-err-as-bug`, which would be silly. This means that if you use `-Ztreat-err-as-bug=1` and there are no normal errors but there are delayed bugs, the first delayed bug will be shown (and the panic will happen after it's printed). Also, I have added a second note saying "those delayed bugs will now be shown as internal compiler errors". I think this makes it clearer what is happening, because the whole concept of delayed bugs is non-obvious. There are some test changes. - equality-in-canonical-query.rs: Minor output changes, and the error count reduces by one because the "no errors encountered even though `span_delayed_bug` issued" message is no longer counted as an error. - rpit_tait_equality_in_canonical_query.rs: Ditto. - storage-live.rs: The query stack disappears because these delayed bugs are now printed at the end, rather than when they are created. - storage-return.rs, span_delayed_bug.rs: now need `-Zeagerly-emit-delayed-bugs` because they need the delayed bugs emitted immediately to preserve behaviour.
2024-01-12Auto merge of #117321 - chenyukang:yukang-fix-117142, r=petrochenkovbors-12/+41
Fix unused_parens issue when cast is followed LT Fixes #117142 The original check only checks `a as (i32) < 0`, this fix extends it to handle `b + a as (i32) < 0`. A better way is maybe we suggest `(a as i32) < 0` instead of suppressing the warning, maybe following PR could improve it.
2024-01-12Update cargoWeihang Lo-0/+0
2024-01-12Auto merge of #119452 - ↵bors-4/+101
AngelicosPhosphoros:make_nonzeroint_get_assume_nonzero, r=scottmcm Add assume into `NonZeroIntX::get` LLVM currently don't support range metadata for function arguments so it fails to optimize non zero integers using their invariant if they are provided using by-value function arguments. Related to https://github.com/rust-lang/rust/issues/119422 Related to https://github.com/llvm/llvm-project/issues/76628 Related to https://github.com/rust-lang/rust/issues/49572
2024-01-12Exclude well known names from showing a suggestion in check-cfgUrgau-39/+15
2024-01-12Auto merge of #119889 - GuillaumeGomez:rollup-ah3dhya, r=GuillaumeGomezbors-354/+500
Rollup of 6 pull requests Successful merges: - #119817 (Remove special-casing around `AliasKind::Opaque` when structurally resolving in new solver) - #119819 (Check rust lints when an unknown lint is detected) - #119872 (Give me a way to emit all the delayed bugs as errors (add `-Zeagerly-emit-delayed-bugs`)) - #119877 (Add more information to `visit_projection_elem`) - #119884 (Rename `--env` option flag to `--env-set`) - #119885 (Revert #113923) r? `@ghost` `@rustbot` modify labels: rollup
2024-01-12Rollup merge of #119885 - DianQK:revert-pr-113923, r=petrochenkovGuillaume Gomez-160/+90
Revert #113923 Per [#t-compiler/meetings > [weekly] 2024-01-11](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-01-11) discussion, revert #113923. Also revert associated #118568. The PR #113923 causes the regression issue #118609. We need more time to find a proper solution. Discussions start at [412365838](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-01-11/near/412365838) and continue to [412369643](https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-01-11/near/412369643). Fixes #118609. r? compiler
2024-01-12Rollup merge of #119884 - GuillaumeGomez:rename-env-opt, r=davidtwcoGuillaume Gomez-17/+17
Rename `--env` option flag to `--env-set` As discussed [on zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Stabilizing.20.60--env.60.20option.20flag.3F). We rename `--env` to not conflicting names with the [RFC](https://github.com/rust-lang/rfcs/pull/2794). r? `@davidtwco`
2024-01-12Rollup merge of #119877 - celinval:smir-visit-projection, r=oli-obkGuillaume Gomez-19/+38
Add more information to `visit_projection_elem` Without the starting place, it's hard to retrieve any useful information from visiting a projection. Note: I still need to add a test.
2024-01-12Rollup merge of #119872 - compiler-errors:eagerly-emit-delayed-bugs, ↵Guillaume Gomez-43/+112
r=oli-obk,nnethercote Give me a way to emit all the delayed bugs as errors (add `-Zeagerly-emit-delayed-bugs`) This is probably a *better* way to inspect all the delayed bugs in a program that what exists currently (and therefore makes it very easy to choose the right number `N` with `-Zemit-err-as-bug=N`, though I guess the naming is a bit ironic when you pair both of the flags together, but that feels like naming bikeshed more than anything). This pacifies my only concern with https://github.com/rust-lang/rust/pull/119871#issuecomment-1888170259, because (afaict?) that PR doesn't allow you to intercept a delayed bug's stack trace anymore, which as someone who debugs the compiler a lot, is something that I can *promise* that I do. r? `@nnethercote` or `@oli-obk`
2024-01-12Rollup merge of #119819 - chenyukang:yukang-fix-118183-lint, r=davidtwcoGuillaume Gomez-19/+85
Check rust lints when an unknown lint is detected Fixes #118183
2024-01-12Rollup merge of #119817 - compiler-errors:normalize-opaques, r=lcnrGuillaume Gomez-96/+158
Remove special-casing around `AliasKind::Opaque` when structurally resolving in new solver This fixes a few inconsistencies around where we don't eagerly resolve opaques to their (locally-defined) hidden types in the new solver. It essentially allows this code to work: ```rust fn main() { type Tait = impl Sized; struct S { i: i32, } let x: Tait = S { i: 0 }; println!("{}", x.i); } ``` Since `Tait` is defined in `main`, we are able to poke through the type of `x` with deref. r? lcnr
2024-01-12Auto merge of #119396 - Nadrieril:intersection-tracking, r=WaffleLapkinbors-135/+206
Exhaustiveness: track overlapping ranges precisely The `overlapping_range_endpoints` lint has false positives, e.g. https://github.com/rust-lang/rust/issues/117648. I expected that removing these false positives would have too much of a perf impact but never measured it. This PR is an experiment to see if the perf loss is manageable. r? `@ghost`
2024-01-12Delegation implementation: step 1Bryanskiy-93/+1634
2024-01-12check rust lints when an unknown lint is detectedyukang-19/+85
2024-01-12Revert "Auto merge of #113923 - DianQK:restore-no-builtins-lto, r=pnkfelix"DianQK-133/+89
This reverts commit 8c2b57721728233e074db69d93517614de338055, reversing changes made to 9cf18e98f82d85fa41141391d54485b8747da46f.
2024-01-12Revert "Auto merge of #118568 - DianQK:no-builtins-symbols, r=pnkfelix"DianQK-30/+4
This reverts commit 503e129328080e924c0ddfca6abf4c2812580102, reversing changes made to 0e7f91b75e7484a713e2f644212cfc1aa7478a28.
2024-01-12Rename `--env` option flag to `--env-set`Guillaume Gomez-17/+17
2024-01-12Auto merge of #119879 - matthiaskrgr:rollup-y710der, r=matthiaskrgrbors-54/+190
Rollup of 4 pull requests Successful merges: - #119781 (fix typo) - #119865 (Set `c_str_literals` stabilization version back to `CURRENT_RUSTC_VERSION`) - #119866 (Convert `effects` description to doc comment) - #119868 (Register even erroneous impls) r? `@ghost` `@rustbot` modify labels: rollup
2024-01-12update debuginfo tests on Windowsjoboet-2/+2
2024-01-12Rollup merge of #119868 - oli-obk:unknown_lifetime_ice, r=compiler-errorsMatthias Krüger-51/+187
Register even erroneous impls Otherwise the specialization graph fails to pick it up, even though other code assumes that all impl blocks have an entry in the specialization graph. also includes an unrelated cleanup of the specialization graph query fixes #119827
2024-01-12Rollup merge of #119866 - smoelius:patch-2, r=compiler-errorsMatthias Krüger-1/+1
Convert `effects` description to doc comment So that it is visible here: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_feature/unstable/struct.Features.html#structfield.effects r? `@fee1-dead`
2024-01-12Rollup merge of #119865 - eduardosm:bump-version-c_str_literals, r=NilstriebMatthias Krüger-1/+1
Set `c_str_literals` stabilization version back to `CURRENT_RUSTC_VERSION` `c_str_literals`'s stabilization has been delayed to 1.77 (https://github.com/rust-lang/rust/pull/119528).
2024-01-12Rollup merge of #119781 - Kleinmarb:master, r=NilstriebMatthias Krüger-1/+1
fix typo
2024-01-12Auto merge of #119735 - lcnr:provisional-cache-readd, r=compiler-errorsbors-111/+445
next solver: provisional cache this adds the cache removed in #115843. However, it should now correctly track whether a provisional result depends on an inductive or coinductive stack. While working on this, I was using the following doc: https://hackmd.io/VsQPjW3wSTGUSlmgwrDKOA. I don't think it's too helpful to understanding this, but am somewhat hopeful that the inline comments are more useful. There are quite a few future perf improvements here. Given that this is already very involved I don't believe it is worth it (for now). While working on this PR one of my few attempts to significantly improve perf ended up being unsound again because I was not careful enough :sparkles: r? `@compiler-errors`
2024-01-12Auto merge of #118548 - Enselic:bench-padding, r=thomcc,ChrisDentonbors-14/+58
libtest: Fix padding of benchmarks run as tests ### Summary The first commit adds regression tests for libtest padding. The second commit fixes padding for benches run as tests and updates the blessed output of the regression tests to make it clear what effect the fix has on padding. Closes #104092 which is **E-help-wanted** and **regression-from-stable-to-stable** ### More details Before this fix we applied padding _before_ manually doing what `convert_benchmarks_to_tests()` does which affects padding calculations. Instead use `convert_benchmarks_to_tests()` first if applicable and then apply padding afterwards so it becomes correct. Benches should only be padded when run as benches to make it easy to compare the benchmark numbers. Not when run as tests. r? `@ghost` until CI passes.
2024-01-12Give me a way to emit all the delayed bugsMichael Goulet-0/+49
2024-01-12Good path bugs are just a flavor of delayed bugMichael Goulet-29/+44
2024-01-12Auto merge of #119430 - NCGThompson:int-pow-bench, r=cuviperbors-12/+100
Add Benchmarks for int_pow Methods. There is quite a bit of room for improvement in performance of the `int_pow` family of methods. I added benchmarks for those functions. In particular, there are benchmarks for small compile-time bases to measure the effect of #114390. ~~I added a lot (245), but all but 22 of them are marked with `#[ignore]`. There are a lot of macros, and I would appreciate feedback on how to simplify them.~~ ~~To run benches relevant to #114390, use `./x bench core --stage 1 -- pow_base_const --include-ignored`.~~
2024-01-11Add more information to `visit_projection_elem`Celina G. Val-19/+38
Without the starting place, it's hard to retrieve any useful information from visiting a projection.
2024-01-12Avoid repetition in `flush_delayed` calls.Nicholas Nethercote-15/+20
There are two places that handle normal delayed bugs. This commit factors out some repeated code. Also, we can use `std::mem::take` instead of `std::mem::replace`.
2024-01-12update paths in commentsjoboet-10/+10
2024-01-12update paths in toolsjoboet-12/+12
2024-01-11Register even erroneous implsOli Scherer-5/+138
Otherwise the specialization graph fails to pick it up, even though other code assumes that all impl blocks have an entry in the specialization graph.
2024-01-11`specialization_graph_of`'s `errored` field is used in the only call site, ↵Oli Scherer-46/+49
and used to immediately throw away the rest of the value. Let's use `Result` to statically signal that this is happening
2024-01-11Auto merge of #119864 - matthiaskrgr:rollup-mc2qz13, r=matthiaskrgrbors-634/+500
Rollup of 8 pull requests Successful merges: - #119448 (annotate-snippets: update to 0.10) - #119813 (Silence some follow-up errors [2/x]) - #119836 (chore: remove unnecessary blank line) - #119841 (Remove `DiagnosticBuilder::buffer`) - #119842 (coverage: Add enums to accommodate other kinds of coverage mappings) - #119845 (rint: further doc tweaks) - #119852 (give const-err4 a more descriptive name) - #119853 (rustfmt.toml: don't ignore just any tests path, only root one) r? `@ghost` `@rustbot` modify labels: rollup
2024-01-11Set `c_str_literals` stabilization version back to `CURRENT_RUSTC_VERSION`Eduardo Sánchez Muñoz-1/+1
`c_str_literals`'s stabilization has been delayed to 1.77 (https://github.com/rust-lang/rust/pull/119528).
2024-01-11update path reference in license definitionsjoboet-1/+1
2024-01-11std: update miri testsjoboet-28/+28
2024-01-11miri: update reference to PAL module on Windowsjoboet-2/+2
2024-01-11std: fix module references on Windowsjoboet-5/+5
2024-01-11std: fix module references on UNIXjoboet-8/+8