Commit Graph

35 Commits

Author SHA1 Message Date
Nicholas Nethercote
6d850d936b Make hir::PathSegment::res non-optional. 2022-09-05 14:20:25 +10:00
Oli Scherer
ee3c835018 Always import all tracing macros for the entire crate instead of piecemeal by module 2022-09-01 14:54:27 +00:00
Jean CASPAR
73ae38bac1 Migrate ast_lowering::path to SessionDiagnostic 2022-08-22 19:19:58 +02:00
Camille GILLOT
8fc3deb1b4 Remove sess field from LoweringContext. 2022-07-06 23:15:57 +02:00
Camille GILLOT
32af719b07 Always create parameters for functions-like types. 2022-06-21 21:13:41 +02:00
bors
3a8b0144c8 Auto merge of #98106 - cjgillot:split-definitions, r=michaelwoerister
Split up `Definitions` and `ResolverAstLowering`.

Split off https://github.com/rust-lang/rust/pull/95573

r? `@michaelwoerister`
2022-06-17 10:00:11 +00:00
EdwinRy
71a98e1a4e Refactor path segment parameter error 2022-06-15 02:50:34 +01:00
Camille GILLOT
603746a35e Make ResolverAstLowering a struct. 2022-06-14 22:44:27 +02:00
Santiago Pastorino
a22aad32eb
Instrument important fns in AST lowering 2022-06-07 18:29:06 -03:00
Santiago Pastorino
d327db9319
Remove ImplTraitContext::reborrow 2022-05-31 16:49:27 -03:00
Santiago Pastorino
3d6eae8cd2
Move defs and bounds from Universal to LoweringContext 2022-05-31 12:40:34 -03:00
Jacob Pratt
49c82f31a8
Remove crate visibility usage in compiler 2022-05-20 20:04:54 -04:00
Camille GILLOT
6857a8d14e Create a specific struct for lifetime capture. 2022-04-27 22:03:12 +02:00
Camille GILLOT
f385f856cd Use LifetimeRes during lowering. 2022-04-27 22:00:15 +02:00
Camille GILLOT
a9e13fa553 Lint elided lifetimes in path on the AST. 2022-04-17 11:03:34 +02:00
Michael Goulet
f04f732503 Add more information to impl Trait deny error 2022-02-17 18:45:53 -08:00
kadmin
67f56671d0 Use Term in ProjectionPredicate
ProjectionPredicate should be able to handle both associated types and consts so this adds the
first step of that. It mainly just pipes types all the way down, not entirely sure how to handle
consts, but hopefully that'll come with time.
2022-01-17 17:44:56 +00:00
Michael Goulet
e37d012a06 Tighten span when suggesting lifetime on path 2021-12-27 23:34:52 -08:00
Matthias Krüger
a5ee722f1e
Rollup merge of #91273 - Badel2:ice-index-str, r=estebank
Fix ICE #91268 by checking that the snippet ends with a `)`

Fix #91268

Previously it was assumed that the last character of `snippet` will be a `)`, so using `snippet.len() - 1` as an index should be safe. However as we see in the test, it is possible to enter that branch without a closing `)`, and it will trigger the panic if the last character happens to be multibyte.

The fix is to ensure that the snippet ends with `)`, and skip the suggestion otherwise.
2021-12-03 06:24:14 +01:00
Camille GILLOT
b621133200 Simplify lowering. 2021-11-30 22:55:07 +01:00
Camille GILLOT
5ea7ea8a57 Lint elided lifetimes in path during lifetime resolution. 2021-11-30 22:55:07 +01:00
Badel2
0da3a0f56e Fix ICE #91268 by checking that the snippet ends with a ) 2021-11-26 23:57:21 +01:00
Camille GILLOT
d7795d302a Do not store visibility in *ItemRef. 2021-09-20 00:29:53 +02:00
Camille GILLOT
26eeec0baf Compute item_generics_num_lifetimes during resolution. 2021-09-01 20:13:16 +02:00
Vadim Petrochenkov
59013cdebe ast_lowering: Introduce lower_span for catching all spans entering HIR 2021-08-29 10:49:40 +03:00
jackh726
ae02491984 Better errors when we don't have implicit statics in trait objects 2021-07-19 23:46:11 -04:00
Giacomo Stevanato
b1c8835a0f Add more precise span informations to generic types 2021-05-12 11:36:07 +02:00
b-naber
e4d9bc66f6 improve diagnosts for GATs 2021-05-11 14:09:46 +02:00
Vadim Petrochenkov
7e66e9d6b0 More precise spans for HIR paths 2021-03-15 22:13:45 +03:00
b-naber
760a6654fb lowering of generic args in AssocTyConstraint 2021-02-04 16:20:58 +01:00
LingMan
a56bffb4f9 Use Option::map_or instead of .map(..).unwrap_or(..) 2021-01-14 19:23:59 +01:00
Patryk Wychowaniec
d2f8e398f1
Rework diagnostics for wrong number of generic args 2021-01-10 13:07:40 +01:00
Aaron Hill
23018a55d9
Implement rustc side of report-future-incompat 2020-10-30 20:02:14 -04:00
Joshua Nelson
bfecb18771 Fix some more clippy warnings 2020-10-30 10:12:56 -04:00
mark
9e5f7d5631 mv compiler to compiler/ 2020-08-30 18:45:07 +03:00