about summary refs log tree commit diff
path: root/compiler/rustc_hir_analysis/src
AgeCommit message (Collapse)AuthorLines
2022-10-27Remap early bound lifetimes tooMichael Goulet-1/+1
2022-10-26Process registered region obligation in resolve_regions_with_wf_tysMichael Goulet-0/+4
2022-10-26Convert all #[suggestion_*] attributes to #[suggestion(style = "...")]Xiretza-2/+6
Using the following command: find compiler/ -type f -name '*.rs' -exec perl -i -gpe \ 's/(#\[\w*suggestion)_(short|verbose|hidden)\(\s*(\S+,)?/\1(\3style = "\2",/g' \ '{}' +
2022-10-26Rollup merge of #95710 - ↵Dylan DPC-1/+1
fee1-dead-contrib:stabilize_arbitrary_enum_discriminant, r=joshtriplett Stabilize arbitrary_enum_discriminant, take 2 Documentation has been updated in https://github.com/rust-lang/reference/pull/1055. cc #86860 for previous stabilization report. Not yet marks https://github.com/rust-lang/rust/issues/60553 as done: need documentation in the rust reference.
2022-10-25Split diagnostic details out into a separate function and fluent filesOli Scherer-26/+48
2022-10-25Move a wf-check into the site where the value is instantiatedOli Scherer-21/+83
2022-10-24Delay span bug when we can't map lifetimes back in collect_trait_impl_trait_tysMichael Goulet-2/+10
2022-10-24Make param index generation a bit more robustOli Scherer-13/+14
2022-10-23Cleanup message and bless testsJack Huey-1/+1
2022-10-23Apply suggestions from code review Jack Huey-3/+3
Use ticks around abis. Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2022-10-23Enable varargs support for calling conventions other than C or cdeclSoveu-13/+33
This patch makes it possible to use varargs for calling conventions, which are either based on C (like efiapi) or C is based on them (for example sysv64 and win64).
2022-10-23Auto merge of #103345 - Nilstrieb:diag-flat, r=compiler-errorsbors-29/+29
Flatten diagnostic slug modules This makes it easier to grep for the slugs in the code. See https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/Localization.20infra.20interferes.20with.20grepping.20for.20error for more discussion about it. This was mostly done with a few regexes and a bunch of manual work. This also exposes a pretty annoying inconsistency for the extra labels. Some of the extra labels are defined as additional properties in the fluent message (which makes them not prefixed with the crate name) and some of them are new fluent messages themselves (which makes them prefixed with the crate name). I don't know whether we want to clean this up at some point but it's useful to know. r? `@davidtwco`
2022-10-23Migrate all diagnosticsNilstrieb-29/+29
2022-10-23Rollup merge of #103123 - compiler-errors:early-binder-iter, r=cjgillotMatthias Krüger-12/+4
Introduce `subst_iter` and `subst_iter_copied` on `EarlyBinder` Makes working with bounds lists a bit easier, which I seem to do a lot. Specifically, means that we don't need to do `.transpose_iter().map(|(pred, _)| *pred)` every time we want to iterate through an `EarlyBinder<&'tcx [(Predicate, Span)]>` (and even then, still have to call `subst` later), which was a very awkward idiom imo.
2022-10-22Auto merge of #103227 - lcnr:bye-bye-unevaluated-const, r=oli-obkbors-9/+4
stop using `ty::UnevaluatedConst` directly best reviewed commit by commit. simplifies #99798 because we now don't have to expand `ty::UnevaluatedConst` to `ty::Const`. I also remember some other places where using `ty::UnevaluatedConst` directly was annoying and caused issues, though I don't quite remember what they were rn '^^ r? `@oli-obk` cc `@JulianKnodt`
2022-10-22Introduce subst_iter and subst_iter_copied on EarlyBinderMichael Goulet-12/+4
2022-10-22Stabilize arbitrary_enum_discriminant, take 2Deadbeef-1/+1
2022-10-22Note scope of TAIT more accuratelyMichael Goulet-0/+7
2022-10-22Rollup merge of #103351 - oli-obk:tilde_const_impls, r=fee1-deadMatthias Krüger-7/+1
Require Drop impls to have the same constness on its bounds as the bounds on the struct have r? ``@fee1-dead``
2022-10-21Require Drop impls to have the same constness on its bounds as the bounds on ↵Oli Scherer-7/+1
the struct have
2022-10-21Auto merge of #103344 - Dylan-DPC:rollup-d1rpfvx, r=Dylan-DPCbors-11/+14
Rollup of 6 pull requests Successful merges: - #102287 (Elaborate supertrait bounds when triggering `unused_must_use` on `impl Trait`) - #102922 (Filtering spans when emitting json) - #103051 (translation: doc comments with derives, subdiagnostic-less enum variants, more derive use) - #103111 (Account for hygiene in typo suggestions, and use them to point to shadowed names) - #103260 (Fixup a few tests needing asm support) - #103321 (rustdoc: improve appearance of source page navigation bar) Failed merges: - #103209 (Diagnostic derives: allow specifying multiple alternative suggestions) r? `@ghost` `@rustbot` modify labels: rollup
2022-10-21Rollup merge of #102922 - kper:bugfix/102902-filtering-json, r=oli-obkDylan DPC-11/+14
Filtering spans when emitting json According to the issue #102902, we shouldn't emit spans which have an empty span and no suggested replacement.
2022-10-20Add fix suggestions for E0199, E0200, and E0569Nicolas Barrios-0/+30
2022-10-20update doc linkslcnr-2/+1
2022-10-20rustc_hir_typeck: fix paths and partially mv fileslcnr-1027/+31
2022-10-20rustc_hir_typeck: move whole fileslcnr-32901/+0
2022-10-20Implement assertions and fixes to not emit empty spans without suggestionsKevin Per-11/+14
2022-10-20Auto merge of #102417 - oli-obk:opaque_lifetimes2, r=jackh726bors-0/+1
Require lifetime bounds for opaque types in order to allow hidden types to capture said lifetimes fixes #96996 cc `@aliemjay`
2022-10-19Rollup merge of #103223 - compiler-errors:deref-sugg-slow, r=wesleywiserMatthias Krüger-5/+6
Use already checked RHS ty for LHS deref suggestions There's no reason to do the `check_lhs_assignable` and RHS `check_expr_with_hint` in that order, so invert them and use the typeck results to avoid exponential blowup on error. Fixes #103219
2022-10-19Rollup merge of #103034 - nathanwhit:let-chains-rhs-temporaries, r=wesleywiserDylan DPC-2/+6
Let expressions on RHS shouldn't be terminating scopes Fixes #100276. Before this PR, we were unconditionally marking the RHS of short-circuiting binary expressions as a terminating scope. In the case of a let chain where the `let` expression was on the RHS, this meant that temporaries within the `let` expr would only live until the end of the expression. Since this only affected the RHS, this led to surprising behavior ([example](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=d1b0a5d1f01882f9c89c2194a75eb19f)). After this PR, we only mark the RHS as a terminating scope if it is not a `let` expression.
2022-10-19Use already checked RHS ty for LHS deref suggestionsMichael Goulet-5/+6
2022-10-19instantiate -> constructMichael Goulet-4/+2
2022-10-19Generalize call suggestion for unsatisfied predicateMichael Goulet-7/+3
2022-10-19Standardize arg suggestions between typeck and trait selectionMichael Goulet-1/+1
2022-10-18change `ConstEvaluatable` to use `ty::Const`lcnr-9/+4
2022-10-17Rollup merge of #102454 - chenyukang:fix-102396-missing-parentheses, r=lcnrMatthias Krüger-2/+113
Suggest parentheses for possible range method calling Fixes #102396
2022-10-17trivial fix for comments feedbackyukang-9/+17
2022-10-16Don't consider `Let` exprs terminating scopesNathan Whitaker-2/+6
2022-10-16Auto merge of #102334 - compiler-errors:rpitit-substs-issue, r=cjgillotbors-19/+64
Fix subst issues with return-position `impl Trait` in trait 1. Fix an issue where we were rebase impl substs onto trait method substs, instead of trait substs 2. Fix an issue where early-bound regions aren't being mapped correctly for RPITIT hidden types Fixes #102301 Fixes #102310 Fixes #102334 Fixes #102918
2022-10-16Auto merge of #102931 - camsteffen:inline-overlapping-impls, r=cjgillotbors-6/+5
Make `overlapping_impls` not generic Trying to win back perf from #101632.
2022-10-15typosMichael Goulet-9/+9
2022-10-15Equate full fn signatures to infer all region variablesMichael Goulet-13/+33
2022-10-15Fix subst issues with RPITITMichael Goulet-6/+31
2022-10-15Auto merge of #101832 - compiler-errors:dyn-star-plus, r=eholkbors-83/+72
Make `dyn*` casts into a coercion, allow `dyn*` upcasting I know that `dyn*` is likely not going to be a feature exposed to surface Rust, but this makes it slightly more ergonomic to write tests for these types anyways. ... and this was just fun to implement anyways. 1. Make `dyn*` into a coercion instead of a cast 2. Enable `dyn*` upcasting since we basically get it for free 3. Simplify some of the cast checking code since we're using the coercion path now r? `@eholk` but feel free to reassign cc `@nikomatsakis` and `@tmandry` who might care about making `dyn*` casts into a coercion
2022-10-14Rollup merge of #103018 - Rageking8:more-dupe-word-typos, r=TaKO8KiDylan DPC-3/+3
More dupe word typos I only picked those changes (from the regex search) that I am pretty certain doesn't change meaning and is just a typo fix. Do correct me if any fix is undesirable and I can revert those. Thanks.
2022-10-14Rollup merge of #102856 - cjgillot:impl-single-check, r=petrochenkovDylan DPC-45/+36
Only test duplicate inherent impl items in a single place Based on https://github.com/rust-lang/rust/pull/100387 r? ``@petrochenkov``
2022-10-14Require lifetime bounds for opaque types in order to allow hidden types to ↵Oli Scherer-0/+1
capture said lifetimes
2022-10-14Address nits, add test for implicit dyn-star coercion without feature gateMichael Goulet-1/+3
2022-10-14Remove CastCheckResult since it's unusedMichael Goulet-26/+5
2022-10-14float and int vars are trivially copyMichael Goulet-0/+4