| Age | Commit message (Collapse) | Author | Lines |
|
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```
|
|
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```
|
|
Also switches on formatting of the mir build module
|
|
|
|
|
|
Suggest accessing field when appropriate
Fix #81222
r? ``@estebank``
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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`````
|
|
|
|
Update compiler/rustc_infer/src/infer/error_reporting/need_type_info.rs
Co-authored-by: Esteban Kuber <estebank@users.noreply.github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
Separate out a `hir::Impl` struct
This makes it possible to pass the `Impl` directly to functions, instead
of having to pass each of the many fields one at a time. It also
simplifies matches in many cases.
See `rustc_save_analysis::dump_visitor::process_impl` or `rustdoc::clean::clean_impl` for a good example of how this makes `impl`s easier to work with.
r? `@petrochenkov` maybe?
|
|
This makes it possible to pass the `Impl` directly to functions, instead
of having to pass each of the many fields one at a time. It also
simplifies matches in many cases.
|
|
|
|
|
|
|
|
|
|
|
|
Use Option::filter instead of open-coding it
`@rustbot` modify labels +C-cleanup +T-compiler
|
|
|
|
(clippy::match_ref_pats)
|
|
|
|
|
|
where possible, pass slices instead of &Vec or &String (clippy::ptr_arg)
|
|
|
|
remove redundant clones (clippy::redundant_clone)
|
|
use matches!() macro in more places
|
|
|
|
|
|
When normalizing a projection which results in a cycle, we would
cache the result of `project_type` without the nested obligations
(because they're not needed for inference). This would result in
the nested obligations only being handled once in fulfill, which
would avoid the cycle error.
Fixes #79714, a regresion from #79305 caused by the removal of
`get_paranoid_cache_value_obligation`.
|
|
Make BoundRegion have a kind of BoungRegionKind
Split from #76814
Also includes making `replace_escaping_bound_vars` only return `T`
Going to r? `@lcnr`
Feel free to reassign
|
|
const_evaluatable_checked: fix occurs check
fixes #79615
this is kind of a hack because we use `TypeRelation` for both the `Generalizer` and the `ConstInferUnifier` but i am not sure if there is a useful way to disentangle this without unnecessarily duplicating some code.
The error in the added test is kind of unavoidable until we erase the unused substs of `ConstKind::Unevaluated`. We talked a bit about this in the cg lazy norm meeting (https://rust-lang.zulipchat.com/#narrow/stream/260443-project-const-generics/topic/lazy_normalization_consts)
|
|
|
|
|
|
|
|
Add more documentation to `Diagnostic` and `DiagnosticBuilder`
cc `@estebank`
|