about summary refs log tree commit diff
path: root/compiler/rustc_resolve/src/late
AgeCommit message (Collapse)AuthorLines
2022-03-02rename ErrorReported -> ErrorGuaranteedmark-3/+3
2022-02-25Rollup merge of #93845 - compiler-errors:in-band-lifetimes, r=cjgillotMatthias Krüger-112/+27
Remove in band lifetimes As discussed in t-lang backlog bonanza, the `in_band_lifetimes` FCP closed in favor for the feature not being stabilized. This PR removes `#![feature(in_band_lifetimes)]` in its entirety. Let me know if this PR is too hasty, and if we should instead do something intermediate for deprecate the feature first. r? `@scottmcm` (or feel free to reassign, just saw your last comment on #44524) Closes #44524
2022-02-24Remove LifetimeDefOriginMichael Goulet-33/+25
2022-02-24Remove in-band lifetimesMichael Goulet-79/+2
2022-02-23rustc_errors: let `DiagnosticBuilder::emit` return a "guarantee of emission".Eduard-Mihai Burtescu-3/+6
2022-02-23Replace `&mut DiagnosticBuilder`, in signatures, with `&mut Diagnostic`.Eduard-Mihai Burtescu-22/+15
2022-02-23rustc_errors: add `downgrade_to_delayed_bug` to `Diagnostic` itself.Eduard-Mihai Burtescu-2/+2
2022-02-20Rollup merge of #94146 - est31:let_else, r=cjgillotMatthias Krüger-23/+10
Adopt let else in more places Continuation of #89933, #91018, #91481, #93046, #93590, #94011. I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs #94139, #94142, #94143, #94144.
2022-02-19Adopt let else in more placesest31-23/+10
2022-02-18Rollup merge of #93634 - matthiaskrgr:clippy_complexity_jan_2022, r=oli-obkMatthias Krüger-1/+1
compiler: clippy::complexity fixes useless_format map_flatten useless_conversion needless_bool filter_next clone_on_copy needless_option_as_deref
2022-02-18Auto merge of #94088 - oli-obk:revert, r=jackh726bors-26/+8
Revert #91403 fixes #94004 r? `@pnkfelix` `@cjgillot`
2022-02-17Rollup merge of #94011 - est31:let_else, r=lcnrMatthias Krüger-8/+4
Even more let_else adoptions Continuation of #89933, #91018, #91481, #93046, #93590.
2022-02-17Revert "Auto merge of #91403 - cjgillot:inherit-async, r=oli-obk"Oli Scherer-26/+8
This reverts commit 3cfa4def7c87d571bd46d92fed608edf8fad236e, reversing changes made to 5d8767cb229b097fedb1dd4bd9420d463c37774f.
2022-02-16Adopt let_else in even more placesest31-8/+4
2022-02-14Auto merge of #93938 - BoxyUwU:fix_res_self_ty, r=lcnrbors-2/+2
Make `Res::SelfTy` a struct variant and update docs I found pattern matching on a `(Option<DefId>, Option<(DefId, bool)>)` to not be super readable, additionally the doc comments on the types in a tuple variant aren't visible anywhere at use sites as far as I can tell (using rust analyzer + vscode) The docs incorrectly assumed that the `DefId` in `Option<(DefId, bool)>` would only ever be for an impl item and I also found the code examples to be somewhat unclear about which `DefId` was being talked about. r? `@lcnr` since you reviewed the last PR changing these docs
2022-02-12change to a struct variantEllen-2/+2
2022-02-12Inherit lifetimes for async fn instead of duplicating them.Camille GILLOT-8/+26
2022-02-11Rollup merge of #93853 - steffahn:map_by_value, r=wesleywiserMatthias Krüger-18/+15
Make all `hir::Map` methods consistently by-value `hir::Map` only consists of a single reference (as part of the contained `TyCtxt`) anyways, so copying is literally zero overhead compared to passing a reference
2022-02-10Remove further usage of `&hir::Map`Frank Steffahn-18/+15
2022-02-09Use a slice for object_lifetime_defaults.Camille GILLOT-78/+71
2022-02-09Ensure that queries only return Copy types.Camille GILLOT-1/+7
2022-02-05resolve lifetimes for const generic defaultsMichael Goulet-1/+4
2022-02-03compiler: clippy::complexity fixesMatthias Krüger-1/+1
useless_format map_flatten useless_conversion needless_bool filter_next clone_on_copy needless_option_as_deref
2022-02-02Detect `::` -> `:` typo in type argumentEsteban Kuber-0/+37
When writing `Vec<A:B>`, suggest `Vec<A::B>`.
2022-01-27Store def_id_to_hir_id as variant in hir_owner.Camille GILLOT-9/+1
If hir_owner is Owner(_), the LocalDefId is pointing to an owner, so the ItemLocalId is 0. If the HIR node does not exist, we store Phantom. Otherwise, we store the HirId associated to the LocalDefId.
2022-01-21Rollup merge of #93046 - est31:let_else, r=davidtwcoMatthias Krüger-41/+38
Use let_else in even more places Followup of #89933, #91018, #91481.
2022-01-19Only suggest adding `!` to expressions that can be macro invocationEsteban Kuber-1/+10
2022-01-18Use let_else in even more placesest31-41/+38
2022-01-16Replace NestedVisitorMap with NestedFilterCameron Steffen-40/+5
2022-01-15Reduce use of local_def_id_to_hir_id.Camille GILLOT-44/+36
2022-01-15Return a LocalDefId in get_parent_item.Camille GILLOT-5/+5
2021-12-27Tighten span when suggesting lifetime on pathMichael Goulet-3/+6
2021-12-19Auto merge of #91957 - nnethercote:rm-SymbolStr, r=oli-obkbors-8/+8
Remove `SymbolStr` This was originally proposed in https://github.com/rust-lang/rust/pull/74554#discussion_r466203544. As well as removing the icky `SymbolStr` type, it allows the removal of a lot of `&` and `*` occurrences. Best reviewed one commit at a time. r? `@oli-obk`
2021-12-16Auto merge of #89836 - pierwill:fix-85142-crate-hash, r=wesleywiserbors-4/+1
Include rustc version in `rustc_span::StableCrateId` `rustc_span::def_id::StableCrateId` is a hash of various data about a crate during compilation. This PR includes the version of `rustc` in the input when computing this hash. From a cursory reading of [RFC 2603](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html), this appears to be acceptable within that design. In order to pass the `mir-opt` and `ui` test suites, this adds new [normalization for hashes and symbol names in `compiletest`](https://github.com/rust-lang/rust/pull/89836/files#diff-03a0567fa80ca04ed5a55f9ac5c711b4f84659be2d0ac4a984196d581c04f76b). These are enabled by default, but we might prefer it to be configurable. In the UI tests, I had to truncate a significant amount of error annotations in v0 symbols (and maybe some legacy) in order to get the normalization to work correctly. (See https://github.com/rust-lang/rust/issues/90116.) Closes #85142.
2021-12-15Rollup merge of #91888 - BoxyUwU:generic_arg_infer_aaaa, r=lcnrMatthias Krüger-5/+4
Handle unordered const/ty generics for object lifetime defaults *feel like I should have a PR description but cant think of what to put here* r? ```@lcnr```
2021-12-15Remove unnecessary sigils around `Ident::as_str()` calls.Nicholas Nethercote-2/+2
2021-12-15Remove unnecessary sigils around `Symbol::as_str()` calls.Nicholas Nethercote-2/+2
2021-12-15Remove `SymbolStr`.Nicholas Nethercote-5/+5
By changing `as_str()` to take `&self` instead of `self`, we can just return `&str`. We're still lying about lifetimes, but it's a smaller lie than before, where `SymbolStr` contained a (fake) `&'static str`!
2021-12-14Rollup merge of #91798 - bugadani:issue-91783, r=michaelwoeristerMatthias Krüger-1/+6
Avoid suggest adding `self` in visibility spec Fixes #91783
2021-12-14awdawdawdEllen-5/+4
2021-12-13Include rustc version in `rustc_span::StableCrateId`pierwill-4/+1
Normalize symbol hashes in compiletest. Remove DefId sorting
2021-12-12Avoid suggesting self in visibility specDániel Buga-1/+6
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
2021-12-11Rollup merge of #91764 - cjgillot:elide-anyway, r=jackh726Matthias Krüger-0/+5
Do not ICE when suggesting elided lifetimes on non-existent spans. Fixes https://github.com/rust-lang/rust/issues/91763 r? `@jackh726`
2021-12-11Do not ICE when suggesting elided lifetimes on non-existent spans.Camille GILLOT-0/+5
2021-12-07Store impl_trait_fn inside OpaqueTyOrigin.Camille GILLOT-4/+11
2021-12-03Annotate `derive`d spans and move span suggestion codeEsteban Kuber-2/+2
* Annotate `derive`d spans from the user's code with the appropciate context * Add `Span::can_be_used_for_suggestion` to query if the underlying span at the users' code
2021-12-03Keep spans for generics in `#[derive(_)]` desugaringEsteban Kuber-11/+5
Keep the spans for generics coming from a `derive`d Item, so that errors and suggestions have better detail. Fix #84003.
2021-11-30Merge Implicit and ImplicitMissing.Camille GILLOT-7/+4
2021-11-30Handle `allow(elided_lifetimes_in_paths)`.Camille GILLOT-31/+28
2021-11-30Lint elided lifetimes in path during lifetime resolution.Camille GILLOT-9/+57