Guillaume Gomez
73d6b603a7
Rollup merge of #82160 - pierwill:patch-2, r=lcnr
...
Fix typo in rustc_infer::infer::UndoLog
Also use double quotes.
2021-02-16 19:21:18 +01:00
Matthias Krüger
4390a61b64
avoid full-slicing slices
...
If we already have a slice, there is no need to get another full-range slice from that, just use the original.
clippy::redundant_slicing
2021-02-16 00:31:11 +01:00
Camille GILLOT
7dd1e8cfdf
Trait impls are Items, therefore HIR owners.
2021-02-15 19:36:13 +01:00
Camille GILLOT
786a80e9ea
Only store a LocalDefId in hir::ImplItem.
2021-02-15 19:32:29 +01:00
Camille GILLOT
a871a0f111
Only store a LocalDefId in hir::TraitItem.
2021-02-15 19:32:28 +01:00
Camille GILLOT
c676e358a5
Use ItemId as a strongly typed index.
2021-02-15 19:24:58 +01:00
pierwill
f2f7ffecd7
Fix typo in rustc_infer::infer::UndoLog
...
Also use double quotes.
2021-02-15 10:02:03 -08:00
Gus Wynn
c28d86c53b
name async generators something more human friendly in type error diagnostics
2021-02-15 08:51:08 -08:00
Ellen
7bd71262f8
param_env debugs are instrumental to rustc's success
2021-02-14 11:18:40 +00:00
Matthew Jasper
0bf1d73d22
Don't go through TraitRef to relate projections
2021-02-13 19:30:07 +00:00
Ellen
b6144e7a20
yeet ya fixme into the void
2021-02-13 19:10:08 +00:00
Ellen
68405fdc2e
debug!("paramenv={}paramenv={}paramenv={}paramenv={}")
2021-02-13 19:10:08 +00:00
0yoyoyo
788e4bb4e5
Fix suggestion to introduce explicit lifetime
2021-02-12 00:48:44 +09:00
Matthew Jasper
f852160a99
Keep existing names of regions in placeholder_error
2021-02-10 20:00:36 +00:00
Matthew Jasper
9337d4fde8
Print closure signatures when reporting placeholder errors
2021-02-09 23:00:33 +00:00
Matthew Jasper
94c11dfe78
Report "nice" placeholder errors more often
...
If we have a cause containing `ValuePairs::PolyTraitRefs` but neither
TraitRef has any escaping bound regions then we report the same error as
for `ValuePairs::TraitRefs`.
2021-02-09 22:59:32 +00:00
Matthew Jasper
daab6db1a0
Avoid repeating self type in placeholder error
2021-02-09 22:28:09 +00:00
Matthew Jasper
c2066cf069
Remove unnecessary note on errors
...
Seeing the trait definition doesn't help with implementation not general
enough errors, so don't make the error message larger to show it.
2021-02-09 21:16:00 +00:00
Matthew Jasper
638980a07f
Using tracing macros in placeholder_error.rs
2021-02-09 21:03:00 +00:00
Matthew Jasper
1eb79f3c37
Use longer lifetime in try_report_from_nll return type
2021-02-09 20:56:45 +00:00
Dylan DPC
44e526b2c3
Rollup merge of #80732 - spastorino:trait-inheritance-self2, r=nikomatsakis
...
Allow Trait inheritance with cycles on associated types take 2
This reverts the revert of #79209 and fixes the ICEs that's occasioned by that PR exposing some problems that are addressed in #80648 and #79811 .
For easier review I'd say, check only the last commit, the first one is just a revert of the revert of #79209 which was already approved.
This also could be considered part or the actual fix of #79560 but I guess for that to be closed and fixed completely we would need to land #80648 and #79811 too.
r? `@nikomatsakis`
cc `@Aaron1011`
2021-02-09 02:39:50 +01:00
Santiago Pastorino
8d17c6a85d
Anonymize late bound regions on transitive bounds that define assoc type
2021-02-08 16:47:51 -03:00
Santiago Pastorino
fd092557ce
Adapt to latest master changes by using PredicateKind
2021-02-05 18:56:57 -03:00
Santiago Pastorino
7aa602b84c
Revert "Auto merge of #79637 - spastorino:revert-trait-inheritance-self, r=Mark-Simulacrum"
...
This reverts commit b4def89d76 , reversing
changes made to 7dc1e852d4 .
2021-02-05 18:56:56 -03:00
Eric Huss
bb22eaf39e
tidy: Run tidy style against markdown files.
2021-02-04 09:01:50 -08:00
Jack Huey
7edb3ad39b
Rollup merge of #81655 - matsujika:suggest-accessing-field-rewording, r=estebank
...
Improve wording of suggestion about accessing field
Follow-up to #81504
The compiler at this moment suggests "you might have meant to use field `b` of type `B`", sounding like it's type `B` which has the field `b`.
r? ```@estebank```
2021-02-02 16:01:48 -05:00
Jack Huey
c1623a2ee7
Rollup merge of #80593 - jackh726:chalk-upgrade, r=nikomatsakis
...
Upgrade Chalk
~~Blocked on rust-lang/chalk#670~~
~~Now blocked on rust-lang/chalk#680 and release~~
In addition to the straight upgrade, I also tried to fix some tests by properly returning variables and max universes in the solution. Unfortunately, this actually triggers the same perf problem that rustc traits code runs into in `canonicalizer`. Not sure what the root cause of this problem is, or why it's supposed to be solved in chalk.
r? ```@nikomatsakis```
2021-02-02 16:01:32 -05:00
Mark Rousskov
d5b760ba62
Bump rustfmt version
...
Also switches on formatting of the mir build module
2021-02-02 09:09:52 -05:00
Hirochika Matsumoto
bad0f288d3
Improve wording of suggestion about accessing field
2021-02-02 15:16:07 +09:00
Jack Huey
4b64bc1fc9
Upgrade Chalk
2021-02-01 10:37:45 -05:00
Jonas Schievink
853cfd462f
Rollup merge of #81504 - matsujika:suggestion-field-access, r=estebank
...
Suggest accessing field when appropriate
Fix #81222
r? ``@estebank``
2021-02-01 14:29:37 +01:00
Jonas Schievink
9e8753e2bb
Rollup merge of #81463 - matsujika:nll-ensure-c-case, r=varkor
...
Rename NLL* to Nll* accordingly to C-CASE
Given [C-CASE](https://rust-lang.github.io/api-guidelines/naming.html#casing-conforms-to-rfc-430-c-case ), `NLLRegionVariableOrigin` and `NLL` are encouraged to be `NllRegionVariableOrigin` and `Nll` respectively.
2021-02-01 14:29:35 +01:00
Hirochika Matsumoto
f45a99361a
Rustfmt
2021-01-31 16:52:46 +09:00
Hirochika Matsumoto
a292ac7177
Fix prefix of debug log
2021-01-31 16:49:33 +09:00
Hirochika Matsumoto
6bc9634de3
Rename function to suggest_accessing_field_where_appropriate
2021-01-30 14:25:43 +09:00
Hirochika Matsumoto
2ce2d145c2
Account for union
2021-01-30 14:18:50 +09:00
Hirochika Matsumoto
08d31e0f09
Remove logging iterator
2021-01-30 13:50:44 +09:00
Hirochika Matsumoto
9e4ed337c7
Suggest accessing field when code compiles with it
2021-01-29 06:52:49 +09:00
Hirochika Matsumoto
f8e0e78d75
Rename NLL* to Nll* accordingly to C-CASE
2021-01-28 16:18:25 +09:00
Yuki Okushi
446edd1e1a
Rollup merge of #79951 - LeSeulArtichaut:ty-ir, r=nikomatsakis
...
Refractor a few more types to `rustc_type_ir`
In the continuation of #79169 , ~~blocked on that PR~~.
This PR:
- moves `IntVarValue`, `FloatVarValue`, `InferTy` (and friends) and `Variance`
- creates the `IntTy`, `UintTy` and `FloatTy` enums in `rustc_type_ir`, based on their `ast` and `chalk_ir` equilavents, and uses them for types in the rest of the compiler.
~~I will split up that commit to make this easier to review and to have a better commit history.~~
EDIT: done, I split the PR in commits of 200-ish lines each
r? `````@nikomatsakis````` cc `````@jackh726`````
2021-01-28 15:09:02 +09:00
LeSeulArtichaut
50e1ae15e9
Use ty::{IntTy,UintTy,FloatTy} in rustc
2021-01-18 21:09:30 +01:00
Daiki Ihara
db95b5ca9b
Add suggestion for impl_candidates with E0283
...
Update compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com >
2021-01-18 21:57:15 +09:00
Jack Huey
dcad9f1893
More review comments
2021-01-16 18:56:37 -05:00
Jack Huey
3dea68de1d
Review changes
2021-01-16 18:56:37 -05:00
Jack Huey
476bd53058
Cleanup
2021-01-16 18:50:34 -05:00
Jack Huey
e76476afe4
Cleanup
2021-01-16 18:40:47 -05:00
Jack Huey
4cd6f85a07
Remove PredicateKind
2021-01-16 18:40:47 -05:00
Jack Huey
8278314a8b
Remove PredicateKind::Atom
2021-01-16 18:40:47 -05:00
LingMan
a56bffb4f9
Use Option::map_or instead of .map(..).unwrap_or(..)
2021-01-14 19:23:59 +01:00
bors
fc93e4719c
Auto merge of #80960 - Dylan-DPC:rollup-89tri8x, r=Dylan-DPC
...
Rollup of 10 pull requests
Successful merges:
- #78901 (diagnostics: Note capturing closures can't be coerced to fns)
- #79588 (Provide more information for HRTB lifetime errors involving closures)
- #80232 (Remove redundant def_id lookups)
- #80662 (Added support for i386-unknown-linux-gnu and i486-unknown-linux-gnu)
- #80736 (use Once instead of Mutex to manage capture resolution)
- #80796 (Update to LLVM 11.0.1)
- #80859 (Fix --pretty=expanded with --remap-path-prefix)
- #80922 (Revert "Auto merge of #76896 - spastorino:codegen-inline-fns2)
- #80924 (Fix rustdoc --test-builder argument parsing)
- #80935 (Rename `rustc_middle::lint::LevelSource` to `LevelAndSource`)
Failed merges:
r? `@ghost`
`@rustbot` modify labels: rollup
2021-01-13 04:29:45 +00:00