about summary refs log tree commit diff
path: root/src
AgeCommit message (Collapse)AuthorLines
2022-03-26Auto merge of #95299 - mkroening:rm-hermitkernel, r=joshtriplettbors-80/+0
Remove hermitkernel targets RustyHermit now maintains custom json targets, which are distributed with the kernel: https://github.com/hermitcore/libhermit-rs/pull/395 See https://github.com/hermitcore/rusty-hermit/issues/197#issuecomment-1076667961 CC: `@stlankes,` `@bstrie`
2022-03-26Auto merge of #95149 - cjgillot:once-diag, r=estebankbors-107/+58
Remove `Session::one_time_diagnostic` This is untracked mutable state, which modified the behaviour of queries. It was used for 2 things: some full-blown errors, but mostly for lint declaration notes ("the lint level is defined here" notes). It is replaced by the diagnostic deduplication infra which already exists in the diagnostic emitter. A new diagnostic level `OnceNote` is introduced specifically for lint notes, to deduplicate subdiagnostics. As a drive-by, diagnostic emission takes a `&mut` to allow dropping the `SubDiagnostic`s.
2022-03-25Replace wait-for instructions for rustdoc GUI tests with wait-for-cssGuillaume Gomez-36/+19
2022-03-25Update browser-ui-test version to 0.8.4Guillaume Gomez-1/+1
2022-03-25Auto merge of #95282 - RalfJung:miri, r=RalfJungbors-8/+8
update Miri Fixes https://github.com/rust-lang/rust/issues/95258 r? `@ghost`
2022-03-25Bless rustdoc tests.Camille GILLOT-30/+0
2022-03-25Auto merge of #95255 - petrochenkov:suggresolve, r=michaelwoeristerbors-224/+42
resolve: Do not build expensive suggestions if they are not actually used And remove a bunch of (conditionally) unused parameters from path resolution functions. This helps with performance issues in https://github.com/rust-lang/rust/pull/94857, and should be helpful in general even without that.
2022-03-25Remove hermitkernel targetsMartin Kröning-80/+0
RustyHermit now maintains custom json targets, which are distributed with the kernel. [1] [1]: https://github.com/hermitcore/libhermit-rs/pull/395
2022-03-25Auto merge of #95082 - spastorino:overlap-inherent-impls, r=nikomatsakisbors-0/+47
Overlap inherent impls r? `@nikomatsakis` Closes #94526
2022-03-25Auto merge of #92361 - vacuus:doctest-run-test-out-lines, r=CraftSpiderbors-5/+5
Remove `collect` in `doctest::run_test`
2022-03-25Auto merge of #95291 - Dylan-DPC:rollup-vrb4wlw, r=Dylan-DPCbors-193/+155
Rollup of 5 pull requests Successful merges: - #94391 (Fix ice when error reporting recursion errors) - #94655 (Clarify which kinds of MIR are allowed during which phases.) - #95179 (Try to evaluate in try unify and postpone resolution of constants that contain inference variables) - #95270 (debuginfo: Fix debuginfo for Box<T> where T is unsized.) - #95276 (add diagnostic items for clippy's `trim_split_whitespace`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-25Rollup merge of #95270 - michaelwoerister:fix-box-unsized-debuginfo, ↵Dylan DPC-4/+15
r=wesleywiser debuginfo: Fix debuginfo for Box<T> where T is unsized. Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`. This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem. r? ````@wesleywiser````
2022-03-25Rollup merge of #95179 - b-naber:eval-in-try-unify, r=lcnrDylan DPC-189/+114
Try to evaluate in try unify and postpone resolution of constants that contain inference variables We want code like that in [`ui/const-generics/generic_const_exprs/eval-try-unify.rs`](https://github.com/rust-lang/rust/compare/master...b-naber:eval-in-try-unify?expand=1#diff-8027038201cf07a6c96abf3cbf0b0f4fdd8a64ce6292435f01c8ed995b87fe9b) to compile. To do that we need to try to evaluate constants in `try_unify_abstract_consts`, this requires us to be more careful about what constants we try to resolve, specifically we cannot try to resolve constants that still contain inference variables. r? `@lcnr`
2022-03-25Rollup merge of #94391 - light4:issue-90319, r=estebankDylan DPC-0/+26
Fix ice when error reporting recursion errors Fixes: #90319, #92148, #93955
2022-03-25resolve: Stop passing unused spans and node ids to path resolution functionsVadim Petrochenkov-1/+1
2022-03-25resolve: Optimize path resolution for rustdocVadim Petrochenkov-33/+22
Do not construct or pass unused data
2022-03-25resolve: Do not build expensive suggestions if they are not actually usedVadim Petrochenkov-190/+19
Also remove a redundant parameter from `fn resolve_path(_with_ribs)`, `crate_lint: CrateLint` is a more detailed version of `record_used: bool` with `CrateLint::No` meaning `false` and anything else meaning `true`.
2022-03-24Auto merge of #95273 - flip1995:clippyup, r=manishearthbors-546/+1957
Update Clippy r? `@Manishearth`
2022-03-24Where bounds are checked on inherent implsSantiago Pastorino-0/+25
2022-03-24Auto merge of #94934 - Lireer:const-prop-lint, r=oli-obkbors-62/+248
Separate const prop lints from optimizations r? `@oli-obk` Separates lints and optimizations during const prop by moving the lints into their own file and checking them during post borrowck cleanup. Thanks to `@oli-obk` for mentoring me.
2022-03-24update MiriRalf Jung-8/+8
2022-03-25Fix ice when error reporting recursion errorslightning1141-0/+26
Fixes: #90319, #92148, #93955
2022-03-24Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyupflip1995-546/+1957
2022-03-24Auto merge of #94876 - b-naber:thir-abstract-const-changes, r=lcnrbors-0/+42
Change Thir to lazily create constants To allow `AbstractConst`s to work with the previous thir changes we made and those we want to make, i.e. to avoid problems due to `ValTree` and `ConstValue` conversions, we instead switch to a thir representation for constants that allows us to lazily create constants. r? `@oli-obk`
2022-03-24update clippy stderr fileOli Scherer-0/+10
2022-03-24Auto merge of #91030 - estebank:trait-bounds-are-tricky-2, r=oli-obkbors-47/+84
Properly track `ImplObligations` Instead of probing for all possible `impl`s that could have caused an `ImplObligation`, keep track of its `DefId` and obligation spans for accurate error reporting. Follow to #89580. Addresses #89418.
2022-03-24debuginfo: Fix debuginfo for Box<T> where T is unsized.Michael Woerister-4/+15
Before this fix, the debuginfo for the fields was generated from the struct defintion of Box<T>, but (at least at the moment) the compiler pretends that Box<T> is just a (fat) pointer, so the fields need to be `pointer` and `vtable` instead of `__0: Unique<T>` and `__1: Allocator`. This is meant as a temporary mitigation until we can make sure that simply treating Box as a regular struct in debuginfo does not cause too much breakage in the ecosystem.
2022-03-24Properly track `ImplObligation`sEsteban Kuber-47/+84
Instead of probing for all possible impls that could have caused an `ImplObligation`, keep track of its `DefId` and obligation spans for accurate error reporting. Follow up to #89580. Addresses #89418. Remove some unnecessary clones. Tweak output for auto trait impl obligations.
2022-03-23Auto merge of #95250 - matthiaskrgr:rollup-ma4zl69, r=matthiaskrgrbors-27/+135
Rollup of 5 pull requests Successful merges: - #94249 (Better errors when a Copy impl on a Struct is not self-consistent) - #95069 (Fix auto traits in rustdoc) - #95221 (interpret/memory: simplify check_and_deref_ptr) - #95225 (remove `[async output]` from `impl Future` pretty-printing) - #95238 (Stop emitting E0026 for struct enums with underscores) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
2022-03-23Rollup merge of #95238 - ↵Matthias Krüger-0/+36
TaKO8Ki:stop-emitting-E0026-for-struct-enum-with-underscore, r=estebank Stop emitting E0026 for struct enums with underscores This patch resolves a part of #83263; r? `@estebank`
2022-03-23Rollup merge of #95225 - compiler-errors:impl-future-generator-ty, r=oli-obkMatthias Krüger-18/+18
remove `[async output]` from `impl Future` pretty-printing self-explanatory, guess it's not as helpful as I thought when I added it 4 months ago re https://github.com/rust-lang/rust/issues/95089#issuecomment-1075482851
2022-03-23Rollup merge of #95221 - RalfJung:check_and_deref_ptr, r=oli-obkMatthias Krüger-9/+9
interpret/memory: simplify check_and_deref_ptr *Finally* I saw a way to make this code simpler. The odd preprocessing in `let ptr_or_addr =` has bothered me since forever, but it actually became unnecessary in the last provenance refactoring. :) This also leads to slightly more explicit error messages as a nice side-effect. :tada: r? `@oli-obk`
2022-03-23Rollup merge of #95069 - GuillaumeGomez:auto-traits-rustdoc, r=oli-obkMatthias Krüger-0/+8
Fix auto traits in rustdoc Fixes #90324. cc `@matthewjasper` r? `@Aaron1011`
2022-03-23Rollup merge of #94249 - compiler-errors:better-copy-errors, r=davidtwcoMatthias Krüger-0/+64
Better errors when a Copy impl on a Struct is not self-consistent As discovered in a Zulip thread with `@nnethercote` and `@Mark-Simulacrum,` it's not immediately obvious why a field on an ADT doesn't implement `Copy`. This PR attempts to give slightly more detailed information by spinning up a fulfillment context to try to dig down and discover transitive fulfillment errors that cause `is_copy_modulo_regions` to fail on a ADT field. The error message still kinda sucks, but should only show up in the case that an existing error message was totally missing... so I think it's a good compromise for now?
2022-03-23Auto merge of #95247 - cuviper:llvm14, r=nikicbors-0/+0
Update to LLVM 14.0.0 final This is a simple rebase of the submodule onto the `llvmorg-14.0.0` release tag. r? `@nikic`
2022-03-23Update to LLVM 14.0.0 finalJosh Stone-0/+0
2022-03-23Auto merge of #95220 - rust-lang:notriddle/ast-validation-semicolon, r=Dylan-DPCbors-3/+1
diagnostics: do not suggest `fn foo({ <body> }` Instead of suggesting that the body always replace the last character on the line, presuming it must be a semicolon, the parser should instead check what the last character is, and append the body if it is anything else. Fixes #83104
2022-03-23Update allocation idOli Scherer-1/+1
2022-03-23Remove line instead of just commenting outCarl Scherer-1/+0
Co-authored-by: Oli Scherer <github35764891676564198441@oli-obk.de>
2022-03-23separate const prop lint from optimizationsCarl Scherer-61/+238
2022-03-23Auto merge of #94901 - fee1-dead:destructable, r=oli-obkbors-71/+90
Rename `~const Drop` to `~const Destruct` r? `@oli-obk` Completely switching to `~const Destructible` would be rather complicated, so it seems best to add it for now and wait for it to be backported to beta in the next release. The rationale is to prevent complications such as #92149 and #94803 by introducing an entirely new trait. And `~const Destructible` reads a bit better than `~const Drop`. Name Bikesheddable.
2022-03-23stop emitting E0026 for struct enums with underscoresTakayuki Maeda-0/+36
2022-03-23add test for treating ExprKind::ConstParam as tempb-naber-0/+42
2022-03-23:arrow_up: rust-analyzerLaurențiu Nicola-19/+23
2022-03-22remove [async output] from impl FutureMichael Goulet-18/+18
2022-03-22bless 32bitRalf Jung-1/+1
2022-03-23Rollup merge of #95219 - ojeda:update-alloc-no-oom-handling-test, r=Dylan-DPCDylan DPC-1/+1
Modernize `alloc-no-oom-handling` test - The edition should be 2021 to avoid warnings. - The `external_crate` feature was removed in commit 45bf1ed1a112 ("rustc: Allow changing the default allocator"). Note that commit d620ae10709c ("Auto merge of #84266") removed the old test, but the new one introduced passed the `--cfg` like in the old one. Signed-off-by: Miguel Ojeda <ojeda@kernel.org> --- This is intended to align this test to the new `no_rc` and `no_sync` ones being added in https://github.com/rust-lang/rust/pull/89891, but it makes sense on its own too.
2022-03-23Rollup merge of #91608 - workingjubilee:fold-neon-fp, r=nagisa,AmanieuDylan DPC-2/+147
Fold aarch64 feature +fp into +neon Arm's FEAT_FP and Feat_AdvSIMD describe the same thing on AArch64: The Neon unit, which handles both floating point and SIMD instructions. Moreover, a configuration for AArch64 must include both or neither. Arm says "entirely proprietary" toolchains may omit floating point: https://developer.arm.com/documentation/102374/0101/Data-processing---floating-point In the Programmer's Guide for Armv8-A, Arm says AArch64 can have both FP and Neon or neither in custom implementations: https://developer.arm.com/documentation/den0024/a/AArch64-Floating-point-and-NEON In "Bare metal boot code for Armv8-A", enabling Neon and FP is just disabling the same trap flag: https://developer.arm.com/documentation/dai0527/a In an unlikely future where "Neon and FP" become unrelated, we can add "[+-]fp" as its own feature flag. Until then, we can simplify programming with Rust on AArch64 by folding both into "[+-]neon", which is valid as it supersets both. "[+-]neon" is retained for niche uses such as firmware, kernels, "I just hate floats", and so on. I am... pretty sure no one is relying on this. An argument could be made that, as we are not an "entirely proprietary" toolchain, we should not support AArch64 without floats at all. I think that's a bit excessive. However, I want to recognize the intent: programming for AArch64 should be simplified where possible. For x86-64, programmers regularly set up illegal feature configurations because it's hard to understand them, see https://github.com/rust-lang/rust/issues/89586. And per the above notes, plus the discussion in https://github.com/rust-lang/rust/issues/86941, there should be no real use cases for leaving these features split: the two should in fact always go together. - Fixes rust-lang/rust#95002. - Fixes rust-lang/rust#95064. - Fixes rust-lang/rust#95122.
2022-03-22Fixup aarch64 smoke testJubilee Young-5/+4
2022-03-22better errors when a Copy impl is not coherentMichael Goulet-0/+64