| Age | Commit message (Collapse) | Author | Lines |
|
|
|
actual changes in behaviour
This makes `type_alias_impl_trait` not actually do anything anymore
|
|
|
|
|
|
Address comments
Update limits
|
|
On structured suggestion for `let` -> `const` and `const` -> `let`, use
a proper `Span` and update tests to check the correct application.
Follow up to #80012.
|
|
|
|
For #78721 and #78722
|
|
Use its own `TypeckResults` to avoid ICE
Fixes #75962
|
|
|
|
fix def collector for impl trait
fixes #77329
We now consistently make `impl Trait` a hir owner, requiring some special casing for synthetic generic params.
r? `@eddyb`
|
|
|
|
Fix #77598.
|
|
|
|
|
|
|
|
|
|
|
|
compare mode chalk don't finish.
|
|
|
|
- List the nestsed obligations in an order that works with the
single pass used by evaluation
- Propagate recursion depth correctly
|
|
|
|
pretty.rs: Update Closure and Generator print
More detailed outline: https://github.com/rust-lang/project-rfc-2229/pull/17
Closes: https://github.com/rust-lang/project-rfc-2229/issues/11
r? `@nikomatsakis`
cc `@eddyb` `@davidtwco` `@estebank`
|
|
Co-authored-by: Dhruv Jauhar <dhruvjhr@gmail.com>
Co-authored-by: Logan Mosier <logmosier@gmail.com>
|
|
This ensures that various wf checks have already been done before we
typeck item bodies.
|
|
|
|
|
|
|
|
|
|
Improve unresolved use error message
"use of undeclared type or module `foo`" doesn't mention that it could be a crate.
This error can happen when users forget to add a dependency to `Cargo.toml`, so I think it's important to mention that it could be a missing crate.
I've used a heuristic based on Rust's naming conventions. It complains about an unknown type if the ident starts with an upper-case letter, and crate or module otherwise. It seems to work very well. The expanded error help covers both an unknown type and a missing crate case.
|
|
|
|
If a symbol name can only be imported from one place for a type, and
as long as it was not glob-imported anywhere in the current crate, we
can trim its printed path and print only the name.
This has wide implications on error messages with types, for example,
shortening `std::vec::Vec` to just `Vec`, as long as there is no other
`Vec` importable anywhere.
This adds a new '-Z trim-diagnostic-paths=false' option to control this
feature.
On the good path, with no diagnosis printed, we should try to avoid
issuing this query, so we need to prevent trimmed_def_paths query on
several cases.
This change also relies on a previous commit that differentiates
between `Debug` and `Display` on various rustc types, where the latter
is trimmed and presented to the user and the former is not.
|
|
|
|
|
|
|
|
|
|
|
|
Add some regression tests
Closes #44861
Closes #51506
Closes #59435
Closes #69840
|
|
|
|
Account for multiple impl/dyn Trait in return type when suggesting `'_`
Make `impl` and `dyn` Trait lifetime suggestions a bit more resilient.
Follow up to #72804.
r? @nikomatsakis
|
|
Specialization is unsound
As discussed in https://github.com/rust-lang/rust/issues/31844#issuecomment-617013949, it might be a good idea to warn users of specialization that the feature they are using is unsound.
I also expanded the "incomplete feature" warning to link the user to the tracking issue.
|
|
|
|
Only display other method receiver candidates if they actually apply
Previously, we would suggest `Box<Self>` as a valid receiver, even if
method resolution only succeeded due to an autoderef (e.g. to `&self`)
|
|
Further tweak lifetime errors involving `dyn Trait` and `impl Trait` in return position
* Suggest substituting `'static` lifetime in impl/dyn `Trait + 'static` instead of `Trait + 'static + '_`
* When `'static` is explicit, also suggest constraining argument with it
* Reduce verbosity of suggestion message and mention lifetime in label
* Tweak output for overlapping required/captured spans
* Give these errors an error code
Follow up to #72543.
r? @nikomatsakis
|
|
|
|
Previously, we would suggest `Box<Self>` as a valid receiver, even if
method resolution only succeeded due to an autoderef (e.g. to `&self`)
|
|
|
|
Fix #70968, partially address #66523.
|
|
|
|
|