about summary refs log tree commit diff
AgeCommit message (Collapse)AuthorLines
2022-08-24Rollup merge of #100919 - sanxiyn:parallel-liveness, r=oli-obkMatthias Krüger-115/+106
Use par_body_owners for liveness I did this refactoring while working on something else. Liveness is about bodies, there is no reason to use par_for_each_module here. Tests are updated because things are visited in a different order. I checked diagnostics are same, just in a different (and IMO, better) order.
2022-08-24Rollup merge of #100912 - tmiasko:make-include, r=TaKO8KiMatthias Krüger-273/+273
Diagnose missing includes in run-make tests
2022-08-24Rollup merge of #100906 - ChayimFriedman2:map-index-mut, r=davidtwcoMatthias Krüger-2/+57
Suggest alternatives when trying to mutate a `HashMap`/`BTreeMap` via indexing The error can be quite confusing to newcomers. Fixes #100873. I'm not so sure about the message, open to wording suggestions.
2022-08-24Rollup merge of #100901 - TaKO8Ki:make-some-methods-private, r=sanxiynMatthias Krüger-2/+3
Make some methods private
2022-08-24Rollup merge of #100888 - ↵Matthias Krüger-33/+42
spastorino:coherence-negative-impls-implied-bounds, r=lcnr Coherence negative impls implied bounds Fixes #93875 This PR is rebased on top of #100789 and it would need to include that one which is already r+ed. r? ``@nikomatsakis`` cc ``@lcnr`` (which I've talked about https://github.com/rust-lang/rust/commit/3222f420d9d2312efe0735eb48160c7b070adc54, I guess after you finish your reordering of modules and work with OutlivesEnvironmentEnv this commit can just be reverted).
2022-08-24Rollup merge of #100855 - IsaacCloos:master, r=joshtriplettMatthias Krüger-0/+4
Extra documentation for new formatting feature Documentation of this feature was added in #90473 and released in Rust 1.58. However, high traffic macros did not receive new examples. Namely `println!()` and `format!()`. The doc comments included in Rust are super important to the community- especially newcomers. I have met several other newbies like myself who are unaware of this recent (well about 7 months old now) update to the language allowing for convenient intra-string identifiers. Bringing small examples of this feature to the doc comments of `println!()` and `format!()` would be helpful to everyone learning the language. [Blog Post Announcing Feature](https://blog.rust-lang.org/2022/01/13/Rust-1.58.0.html) [Feature PR](https://github.com/rust-lang/rust/pull/90473) - includes several instances of documentation of the feature- minus the macros in question for this PR *This is my first time contributing to a project this large. Feedback would mean the world to me 😄* --- *Recreated; I violated the [No-Merge Policy](https://rustc-dev-guide.rust-lang.org/git.html#no-merge-policy)*
2022-08-24Rollup merge of #100826 - ↵Matthias Krüger-2/+38
vincenzopalazzo:macros/wrong_sugg_with_positional_arg, r=TaKO8Ki sugg: take into count the debug formatting Closes https://github.com/rust-lang/rust/issues/100648 This PR will fix a suggestion error by taking into consideration also the `:?` symbol and act in a different way ``@rustbot`` r? ``@compiler-errors`` N.B: I did not find a full way to test the change, any idea?
2022-08-24Rollup merge of #100220 - scottmcm:fix-by-ref-sized, r=joshtriplettMatthias Krüger-12/+38
Properly forward `ByRefSized::fold` to the inner iterator cc ``@timvermeulen,`` who noticed this mistake in https://github.com/rust-lang/rust/pull/100214#issuecomment-1207317625
2022-08-24Rollup merge of #99993 - petrochenkov:linkdated, r=bjorn3Matthias Krüger-18/+18
linker: Update some outdated comments r? ``@bjorn3``
2022-08-24Auto merge of #100942 - ehuss:update-cargo, r=ehussbors-4/+4
Update cargo 7 commits in 9809f8ff33c2b998919fd0432c626f0f7323697a..6da726708a4406f31f996d813790818dce837161 2022-08-16 22:10:06 +0000 to 2022-08-23 21:39:56 +0000 - Update non-ASCII crate name warning message (rust-lang/cargo#11017) - Add more tests for aggressive or precise update (rust-lang/cargo#11011) - Ignore broken but excluded file during traversing (rust-lang/cargo#11008) - Improve error message for wrong target names (rust-lang/cargo#10999) - Bump snapbox to 0.3 (rust-lang/cargo#11005) - remove missed reference to workspace inheritance in unstable.md (rust-lang/cargo#11001) - Warning when precise or aggressive without -p flag (rust-lang/cargo#10988)
2022-08-23Update cargoEric Huss-4/+4
2022-08-24Auto merge of #96869 - sunfishcode:main, r=joshtriplettbors-40/+353
Optimize `Wtf8Buf::into_string` for the case where it contains UTF-8. Add a `is_known_utf8` flag to `Wtf8Buf`, which tracks whether the string is known to contain UTF-8. This is efficiently computed in many common situations, such as when a `Wtf8Buf` is constructed from a `String` or `&str`, or with `Wtf8Buf::from_wide` which is already doing UTF-16 decoding and already checking for surrogates. This makes `OsString::into_string` O(1) rather than O(N) on Windows in common cases. And, it eliminates the need to scan through the string for surrogates in `Args::next` and `Vars::next`, because the strings are already being translated with `Wtf8Buf::from_wide`. Many things on Windows construct `OsString`s with `Wtf8Buf::from_wide`, such as `DirEntry::file_name` and `fs::read_link`, so with this patch, users of those functions can subsequently call `.into_string()` without paying for an extra scan through the string for surrogates. r? `@ghost`
2022-08-23Auto merge of #100675 - Xiretza:fluent-mandate-crate-prefix, r=davidtwcobors-31/+82
fluent: mandate slug names to be prefixed by crate name This is currently only convention, but not actively checked for. Additionally, improve error messages to highlight the path of the offending fluent file rather than the identifier preceding it. This will conflict with #100671, so I'll leave it as draft until that's merged.
2022-08-23sugg: take into count the debug formattingVincenzo Palazzo-2/+38
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2022-08-23Auto merge of #99917 - yaahc:error-in-core-move, r=thomccbors-226/+1264
Move Error trait into core This PR moves the error trait from the standard library into a new unstable `error` module within the core library. The goal of this PR is to help unify error reporting across the std and no_std ecosystems, as well as open the door to integrating the error trait into the panic reporting system when reporting panics whose source is an errors (such as via `expect`). This PR is a rewrite of https://github.com/rust-lang/rust/pull/90328 using new compiler features that have been added to support error in core.
2022-08-23Suggest alternatives when trying to mutate a `HashMap`/`BTreeMap` via indexingChayim Refael Friedman-2/+57
The error can be quite confusing to newcomers.
2022-08-23Auto merge of #100920 - Dylan-DPC:rollup-vlcw3sr, r=Dylan-DPCbors-622/+509
Rollup of 9 pull requests Successful merges: - #99249 (Do not re-parse function signatures to suggest generics) - #100309 (Extend comma suggestion to cases where fields arent missing) - #100368 (InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed>) - #100768 (Migrate `rustc_plugin_impl` to `SessionDiagnostic`) - #100835 (net listen backlog update, follow-up from #97963.) - #100851 (Fix rustc_parse_format precision & width spans) - #100857 (Refactor query modifier parsing) - #100907 (Fix typo in UnreachableProp) - #100909 (Minor `ast::LitKind` improvements) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-23Rollup merge of #100909 - nnethercote:minor-ast-LitKind-improvement, ↵Dylan DPC-21/+21
r=petrochenkov Minor `ast::LitKind` improvements r? `@petrochenkov`
2022-08-23Rollup merge of #100907 - Nilstrieb:unrachable-typo-lol, r=Dylan-DPCDylan DPC-1/+1
Fix typo in UnreachableProp r? ``@Dylan-DPC``
2022-08-23Rollup merge of #100857 - camsteffen:query-parse-refactor, r=davidtwcoDylan DPC-260/+125
Refactor query modifier parsing Reduce redundancy and improve error spans.
2022-08-23Rollup merge of #100851 - Alexendoo:rpf-width-prec-spans, r=fee1-deadDylan DPC-65/+84
Fix rustc_parse_format precision & width spans When a `precision`/`width` was `CountIsName - {:name$}` or `CountIs - {:10}` the `precision_span`/`width_span` was set to `None` For `width` the name span in `CountIsName(_, name_span)` had its `.start` off by one r? ``@fee1-dead`` / cc ``@PrestonFrom`` since this is similar to #99987
2022-08-23Rollup merge of #100835 - devnexen:listener_followups, r=devnexenDylan DPC-4/+2
net listen backlog update, follow-up from #97963. FreeBSD and using system limit instead for others.
2022-08-23Rollup merge of #100768 - Facel3ss1:plugin-impl-translation, r=davidtwcoDylan DPC-11/+35
Migrate `rustc_plugin_impl` to `SessionDiagnostic` Migration of the `rustc_plugin_impl` crate. ~Draft PR because it is blocked on #100694 for `#[fatal(...)]` support~ (this has been merged, and I've changed over to `#[diag(...)]` now too), but I would also like to know if what I did with `LoadPluginError` is okay, because all it does is display the error message from `libloading` ([See conversation on zulip](https://rust-lang.zulipchat.com/#narrow/stream/147480-t-compiler.2Fwg-diagnostics/topic/.23100717.20diagnostic.20translation/near/294327843)). This crate is apparently for a deprecated feature which is used by servo, so I don't know how much this matters anyway.
2022-08-23Rollup merge of #100368 - chenyukang:fix-100321, r=lcnrDylan DPC-12/+11
InferCtxt tainted_by_errors_flag should be Option<ErrorGuaranteed> Fixes #100321. Use Cell<Option<ErrorGuaranteed>> to guarantee that we emit an error when that flag is set.
2022-08-23Rollup merge of #100309 - compiler-errors:issue-100300, r=sanxiynDylan DPC-30/+96
Extend comma suggestion to cases where fields arent missing Fixes #100300
2022-08-23Rollup merge of #99249 - cjgillot:no-reparse-fn, r=fee1-deadDylan DPC-218/+134
Do not re-parse function signatures to suggest generics This PR uses the existing resolution rib infrastructure to channel the correct span information to suggest generic parameters. This allows to avoid re-parsing a function's source code. Drive-by cleanup: this removes useless `FnItemRibKind` from late resolution ribs. All the use cases are already covered by `ItemRibKind` and `AssocItemRibKind` which have more precise semantics.
2022-08-23Use CRATE_HIR_ID and CRATE_DEF_ID for obligations from foreign cratesSantiago Pastorino-11/+13
2022-08-23Do not use unneeded extra errors variableSantiago Pastorino-2/+1
2022-08-23Permit negative impls coherence to take advantage of implied boundsSantiago Pastorino-22/+29
2022-08-23Move InferCtxtExt to rustc_trait_selectionSantiago Pastorino-8/+9
2022-08-23Use par_body_owners for livenessSeo Sanghyeon-115/+106
2022-08-23Auto merge of #100782 - thomcc:fix-android-sigaddset, r=Mark-Simulacrumbors-3/+23
Align android `sigaddset` impl with the reference impl from Bionic In https://github.com/rust-lang/rust/pull/100737 I noticed we were treating the sigset_t as an array of bytes, while referencing code from android (https://github.com/aosp-mirror/platform_bionic/blob/ad8dcd6023294b646e5a8288c0ed431b0845da49/libc/include/android/legacy_signal_inlines.h) which treats it as an array of unsigned long. That said, the behavior difference is so subtle here that it's not hard to see why nobody noticed. This fixes the implementation to be equivalent to the one in bionic.
2022-08-23Diagnose missing includes in run-make testsTomasz Miąsko-273/+273
2022-08-23Remove the symbol from `ast::LitKind::Err`.Nicholas Nethercote-19/+17
Because it's never used meaningfully.
2022-08-23Add some useful comments to `LitKind`.Nicholas Nethercote-2/+4
2022-08-23Fix typo in UnreachablePropnils-1/+1
2022-08-23Auto merge of #100904 - matthiaskrgr:rollup-z3yzivj, r=matthiaskrgrbors-111/+403
Rollup of 9 pull requests Successful merges: - #100382 (Make the GATS self outlives error take into GATs in the inputs) - #100565 (Suggest adding a missing semicolon before an item) - #100641 (Add the armv4t-none-eabi target to the supported_targets) - #100789 (Use separate infcx to solve obligations during negative coherence) - #100832 (Some small bootstrap cleanup) - #100861 (fix ICE with extra-const-ub-checks) - #100862 (tidy: remove crossbeam-utils) - #100887 (Refactor part of codegen_call_terminator) - #100893 (Remove out-of-context comment in `mem::MaybeUninit` documentation) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-08-23Rollup merge of #100893 - thinety:master, r=scottmcmMatthias Krüger-5/+2
Remove out-of-context comment in `mem::MaybeUninit` documentation Reverted the comment to an earlier version to avoid confusion: neither raw pointer assignment nor `ptr::write` is used inside the for loop.
2022-08-23Rollup merge of #100887 - eholk:codegen_call_terminator-cleanup, r=fee1-deadMatthias Krüger-47/+44
Refactor part of codegen_call_terminator I was reading through this code and found the chain of `if let` and a nested match on the same value that was matched in the `if let` to be kind of hard to follow. This PR cleans it up by flattening the `if let` chain and nested match into a single `match` expression.
2022-08-23Rollup merge of #100862 - ehuss:tidy-crossbeam, r=Mark-SimulacrumMatthias Krüger-6/+3
tidy: remove crossbeam-utils crossbeam-utils is no longer needed now that scoped threads are available in 1.63.
2022-08-23Rollup merge of #100861 - RalfJung:const-ice, r=oli-obkMatthias Krüger-7/+53
fix ICE with extra-const-ub-checks Fixes https://github.com/rust-lang/rust/issues/100771
2022-08-23Rollup merge of #100832 - ehuss:bootstrap-cleanup, r=jyn514Matthias Krüger-27/+14
Some small bootstrap cleanup This is a collection of a few small cleanups. See commits for more details. * Remove some unused fields from the tool_extended macro. * Remove rustfmt from publish_toolstate. * Remove Steve from toolstate failure notices. * Don't allow rustfmt to fail on dist.
2022-08-23Rollup merge of #100789 - compiler-errors:issue-99662, r=spastorinoMatthias Krüger-15/+26
Use separate infcx to solve obligations during negative coherence I feel like I fixed this already but I may have fixed it then forgot to push the branch... Also fixes up some redundant param-envs being passed around (since they're already passed around in the `Obligation`) Fixes #99662 r? ``@spastorino``
2022-08-23Rollup merge of #100641 - corwinkuiper:add-armv4t-target, r=oli-obkMatthias Krüger-0/+2
Add the armv4t-none-eabi target to the supported_targets This target was added in #100244 but forgot to add it to the macro in the `mod.rs` file. ``@Lokathor``
2022-08-23Rollup merge of #100565 - ↵Matthias Krüger-2/+233
TaKO8Ki:suggest-adding-missing-semicolon-before-item, r=compiler-errors Suggest adding a missing semicolon before an item fixes #100533
2022-08-23Rollup merge of #100382 - jackh726:gat-self-outlives-input, r=compiler-errorsMatthias Krüger-2/+26
Make the GATS self outlives error take into GATs in the inputs Before, the reasoning was that outlives should factor in to the outlives error, because that value is produced and inputs aren't. However, this is potentially confusing, and we can just require this for now and relax it later if we need. GATs in where clauses still don't count for the self outlives error, and I've added a test for that. This now errors: ```rust trait Input { type Item<'a>; //~^ missing required fn takes_item<'a>(&'a self, item: Self::Item<'a>); } ``` I've also added a test that this does not: ```rust trait WhereClause { type Item<'a>; fn takes_item<'a>(&'a self) where Self::Item<'a>: ; } ``` r? ``@compiler-errors``
2022-08-23Auto merge of #100678 - GuillaumeGomez:improve-rustdoc-json-tests, ↵bors-674/+605
r=aDotInTheVoid Improve rustdoc json tests Fixes #100588. r? `@aDotInTheVoid`
2022-08-22Auto merge of #99963 - cjgillot:iter-submodule, r=compiler-errorsbors-19/+13
Simplify implementation for par_for_each_module
2022-08-22Remove out-of-context comment in `mem::MaybeUninit` documentationThiago Trannin-5/+2
2022-08-23Mark suggestion as MaybeIncorrect.Camille GILLOT-1/+1