Skip to content

Rollup of 5 pull requests #97988

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
wants to merge 14 commits into from
Closed

Conversation

Dylan-DPC
Copy link
Member

Successful merges:

Failed merges:

r? @ghost
@rustbot modify labels: rollup

Create a similar rollup

RalfJung and others added 14 commits June 5, 2022 12:27
…al-path=no`

The test relies on library/std/src/error.rs not corresponding to a local
path, but remapping might still find the related local file of a
remapped path. To fix the test, this adds a new -Z flag to disable
finding the corresponding local path of a remapped path.
validating the vtable can lead to Stacked Borrows errors

Fixes rust-lang/miri#2123
…dy, r=cjgillot

Tidy up miscellaneous bounds suggestions

Just some small fixes to suggestions

- Generalizes `Ty::is_suggestable` into a `TypeVisitor`, so that it can be called on things other than `Ty`
- Makes `impl Trait` in arg position no longer suggestible (generalizing the fix in rust-lang#97640)
- Fixes `impl Trait` not being replaced with fresh type param when it's deeply nested in function signature (fixes rust-lang#97760)
- Fixes some poor handling of `where` clauses with no predicates (also rust-lang#97760)
- Uses `InferCtxt::resolve_numeric_literals_with_default` so we suggest `i32` instead of `{integer}` (fixes rust-lang#97677)

Sorry there aren't many tests the fixes. Most of them would just be duplicates of other tests with empty `where` clauses or `impl Trait` in arg position instead of generic params. Let me know if you'd want more test coverage.
…r=cjgillot

Fix rust-lang#71363's test by adding `-Z translate-remapped-path-to-local-path=no`

The test relies on `library/std/src/error.rs` not corresponding to a local path, but remapping might still find the related local file of a remapped path. To fix the test, this PR adds a new `-Z` flag to disable finding the corresponding local path of a remapped path.
…acro, r=Dylan-DPC

remove an unnecessary `String`
@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. rollup A PR which is a rollup labels Jun 11, 2022
@rust-log-analyzer
Copy link
Collaborator

The job mingw-check failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
    Checking rustc_ast_lowering v0.0.0 (/checkout/compiler/rustc_ast_lowering)
    Checking rustc_ast_passes v0.0.0 (/checkout/compiler/rustc_ast_passes)
    Checking rustc_expand v0.0.0 (/checkout/compiler/rustc_expand)
    Checking rustc_builtin_macros v0.0.0 (/checkout/compiler/rustc_builtin_macros)
error[E0599]: no method named `super_visit_with` found for struct `ty::Ty` in the current scope
   --> compiler/rustc_middle/src/ty/diagnostics.rs:477:11
    |
477 |         t.super_visit_with(self)
    |           ^^^^^^^^^^^^^^^^ method not found in `ty::Ty<'tcx>`
   ::: compiler/rustc_middle/src/ty/mod.rs:466:1
    |
    |
466 | pub struct Ty<'tcx>(Interned<'tcx, WithStableHash<TyS<'tcx>>>);
    | --------------------------------------------------------------- method `super_visit_with` not found for this
   ::: compiler/rustc_middle/src/ty/fold.rs:229:8
    |
    |
229 |     fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy>;
    |        ---------------- the method is available for `ty::Ty<'tcx>` here
    = help: items from traits can only be used if the trait is in scope
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   | use crate::ty::fold::TypeSuperFoldable;
3   | use crate::ty::fold::TypeSuperFoldable;
    |

error[E0599]: no method named `super_visit_with` found for struct `ty::consts::Const` in the current scope
   --> compiler/rustc_middle/src/ty/diagnostics.rs:491:11
    |
491 |         c.super_visit_with(self)
    |           ^^^^^^^^^^^^^^^^ method not found in `ty::consts::Const<'tcx>`
   ::: compiler/rustc_middle/src/ty/consts.rs:25:1
    |
    |
25  | pub struct Const<'tcx>(pub Interned<'tcx, ConstS<'tcx>>);
    | --------------------------------------------------------- method `super_visit_with` not found for this
   ::: compiler/rustc_middle/src/ty/fold.rs:229:8
    |
    |
229 |     fn super_visit_with<V: TypeVisitor<'tcx>>(&self, visitor: &mut V) -> ControlFlow<V::BreakTy>;
    |        ---------------- the method is available for `ty::consts::Const<'tcx>` here
    = help: items from traits can only be used if the trait is in scope
help: one of the expressions' fields has a method of the same name
    |
    |
491 |         c.0.0.ty.super_visit_with(self)
help: the following trait is implemented but not in scope; perhaps add a `use` for it:
    |
3   | use crate::ty::fold::TypeSuperFoldable;
    |

@Dylan-DPC Dylan-DPC closed this Jun 11, 2022
@Dylan-DPC Dylan-DPC deleted the rollup-o849c6s branch June 11, 2022 10:59
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Regression in spacing of left margin in diagnostics
8 participants