- 09 9月, 2021 1 次提交
-
-
由 Ellen 提交于
-
- 03 9月, 2021 1 次提交
-
-
由 Aaron Hill 提交于
-
- 30 8月, 2021 1 次提交
-
-
由 Ellen 提交于
✨
-
- 26 8月, 2021 1 次提交
-
-
由 lcnr 提交于
-
- 22 8月, 2021 1 次提交
-
-
由 Frank Steffahn 提交于
-
- 20 8月, 2021 1 次提交
-
-
由 Niko Matsakis 提交于
-
- 13 8月, 2021 1 次提交
-
-
由 Deadbeef 提交于
-
- 09 8月, 2021 1 次提交
-
-
由 Esteban Küber 提交于
Fix #87549.
-
- 04 8月, 2021 1 次提交
-
-
由 Fabian Wolff 提交于
-
- 03 8月, 2021 1 次提交
-
-
由 Yuki Okushi 提交于
-
- 28 7月, 2021 1 次提交
-
-
由 Fabian Wolff 提交于
-
- 20 7月, 2021 1 次提交
-
-
由 Aaron Hill 提交于
During function type-checking, we normalize any associated types in the function signature (argument types + return type), and then create WF obligations for each of the normalized types. The HIR wf code does not currently support this case, so any errors that we get have imprecise spans. This commit extends `ObligationCauseCode::WellFormed` to support recording a function parameter, allowing us to get the corresponding HIR type if an error occurs. Function typechecking is modified to pass this information during signature normalization and WF checking. The resulting code is fairly verbose, due to the fact that we can no longer normalize the entire signature with a single function call. As part of the refactoring, we now perform HIR-based WF checking for several other 'typed items' (statics, consts, and inherent impls). As a result, WF and projection errors in a function signature now have a precise span, which points directly at the responsible type. If a function signature is constructed via a macro, this will allow the error message to point at the code 'most responsible' for the error (e.g. a user-supplied macro argument).
-
- 17 7月, 2021 1 次提交
-
-
由 Aaron Hill 提交于
During well-formed checking, we walk through all types 'nested' in generic arguments. For example, WF-checking `Option<MyStruct<u8>>` will cause us to check `MyStruct<u8>` and `u8`. However, this is done on a `rustc_middle::ty::Ty`, which has no span information. As a result, any errors that occur will have a very general span (e.g. the definintion of an associated item). This becomes a problem when macros are involved. In general, an associated type like `type MyType = Option<MyStruct<u8>>;` may have completely different spans for each nested type in the HIR. Using the span of the entire associated item might end up pointing to a macro invocation, even though a user-provided span is available in one of the nested types. This PR adds a framework for HIR-based well formed checking. This check is only run during error reporting, and is used to obtain a more precise span for an existing error. This is accomplished by individually checking each 'nested' type in the HIR for the type, allowing us to find the most-specific type (and span) that produces a given error. The majority of the changes are to the error-reporting code. However, some of the general trait code is modified to pass through more information. Since this has no soundness implications, I've implemented a minimal version to begin with, which can be extended over time. In particular, this only works for HIR items with a corresponding `DefId` (e.g. it will not work for WF-checking performed within function bodies).
-
- 19 6月, 2021 5 次提交
- 16 6月, 2021 1 次提交
-
-
由 Aris Merchant 提交于
-
- 04 6月, 2021 1 次提交
-
-
由 Taylor Yu 提交于
Skip where-clauses when suggesting using indirection in combination with `?Sized` bounds on type parameters.
-
- 12 5月, 2021 1 次提交
-
-
由 Camille GILLOT 提交于
-
- 19 4月, 2021 2 次提交
-
-
由 klensy 提交于
-
由 teymour-aldridge 提交于
-
- 27 3月, 2021 1 次提交
-
-
由 Josh Stone 提交于
-
- 17 3月, 2021 2 次提交
- 03 3月, 2021 1 次提交
-
-
由 Ryan Levick 提交于
-
- 02 3月, 2021 1 次提交
-
-
由 Ellen 提交于
-
- 16 2月, 2021 1 次提交
-
-
由 Gus Wynn 提交于
-
- 14 2月, 2021 1 次提交
-
-
由 Matthew Jasper 提交于
Also make sure that type arguments of associated types are printed in some error messages.
-
- 11 2月, 2021 1 次提交
-
-
由 Hirochika Matsumoto 提交于
-
- 04 2月, 2021 1 次提交
-
-
由 Camelid 提交于
-
- 02 2月, 2021 1 次提交
-
-
由 Mark Rousskov 提交于
Also switches on formatting of the mir build module
-
- 18 1月, 2021 1 次提交
-
-
由 Daiki Ihara 提交于
Update compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs Co-authored-by: NEsteban Kuber <estebank@users.noreply.github.com>
-
- 17 1月, 2021 1 次提交
-
-
由 Jack Huey 提交于
-
- 15 1月, 2021 1 次提交
-
-
由 LingMan 提交于
-
- 11 1月, 2021 1 次提交
-
-
由 William Bain 提交于
-
- 03 1月, 2021 2 次提交
-
-
由 Roxane 提交于
-
由 Matthias Krüger 提交于
-
- 24 12月, 2020 1 次提交
-
-
由 Matthias Krüger 提交于
-