8000 Rollup of 10 pull requests by GuillaumeGomez · Pull Request #119611 · rust-lang/rust · GitHub
[go: up one dir, main page]

Skip to content

Rollup of 10 pull requests #119611

New issue

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

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

Already on GitHub? Sign in to your account

Closed
wants to merge 36 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5f56465
Make feature `negative_bounds` internal
fmease Dec 27, 2023
a251974
Deny parenthetical notation for negative bounds
fmease Dec 27, 2023
32cea61
Don't elaborate `!Sized` to `!Sized + Sized`
fmease Dec 27, 2023
977546d
rustc_middle: Pretty-print negative bounds correctly
fmease Dec 27, 2023
786e0bb
bootstrap: Move -Clto= setting from Rustc::run to rustc_cargo
xry111 Dec 29, 2023
76d616d
Handle ForeignItem as TAIT scope.
cjgillot Dec 29, 2023
7fd2d8d
Do not run check on foreign items.
cjgillot Dec 31, 2023
505c137
Rename some `Diagnostic` setters.
nnethercote Dec 23, 2023
5fe5d5d
Remove lots of `rustc_errors::` qualifiers in `lints.rs`.
nnethercote Jan 2, 2024
096b844
Remove forward for `downgrade_to_delayed_bug`.
nnethercote Jan 3, 2024
caefa55
Fix up `forward!` decls.
nnethercote Jan 3, 2024
b4a6239
Fix `forward!` so it doesn't require trailing commas in some cases.
nnethercote Jan 3, 2024
1e92223
Remove unused `DiagnosticBuilder::struct_almost_fatal`.
nnethercote Jan 3, 2024
9560c58
Avoid some `rustc_errors::` qualifiers.
nnethercote Jan 4, 2024
8000
4d35981
Remove unused `struct_error` function.
nnethercote Jan 4, 2024
8e6bca6
Inline and remove `StringReader::struct_fatal_span_char`.
nnethercote Jan 4, 2024
03e9eff
Use `resolutions(()).effective_visiblities` to avoid cycle errors
compiler-errors Jan 4, 2024
af32054
Remove `-Zdump-mir-spanview`
Zalathar Jan 4, 2024
8388112
Remove `is_lint` field from `Level::Error`.
nnethercote Jan 4, 2024
cf9484e
Remove `-Zreport-delayed-bugs`.
nnethercote Jan 4, 2024
35ad2ae
Fix invalid handling for static method calls in jump to definition fe…
GuillaumeGomez Jan 4, 2024
5bc7687
Add regression test for jump to def static method calls
GuillaumeGomez Jan 4, 2024
073ed0e
Move `i586-unknown-netbsd` from tier 2 to tier 3 platform support table
Nemo157 Jan 4, 2024
12b92c8
Visit only reachable blocks in MIR lint
tmiasko Dec 30, 2023
a084e06
Fix validation and linting of injected MIR
tmiasko Jan 1, 2024
df116ec
Migrate memory overlap check from validator to lint
tmiasko Jan 4, 2024
98c9d72
Rollup merge of #119354 - fmease:negative_bounds-fixes, r=compiler-er…
GuillaumeGomez Jan 5, 2024
3a19a92
Rollup merge of #119414 - xry111:xry111/lto-test, r=Mark-Simulacrum
GuillaumeGomez Jan 5, 2024
2dcaadb
Rollup merge of #119420 - cjgillot:issue-119295, r=compiler-errors
GuillaumeGomez Jan 5, 2024
3eebe88
Rollup merge of #119506 - compiler-errors:visibilities-for-object-saf…
GuillaumeGomez Jan 5, 2024
c537d20
Rollup merge of #119538 - nnethercote:cleanup-errors-5, r=compiler-er…
GuillaumeGomez Jan 5, 2024
38e22ad
Rollup merge of #119566 - Zalathar:remove-spanview, r=Swatinem,Nilstrieb
GuillaumeGomez Jan 5, 2024
22a6343
Rollup merge of #119567 - nnethercote:rm-Zreport-delayed-bugs, r=oli-obk
GuillaumeGomez Jan 5, 2024
c224f4d
Rollup merge of #119577 - tmiasko:lint, r=oli-obk
GuillaumeGomez Jan 5, 2024
eef3320
Rollup merge of #119586 - GuillaumeGomez:jump-to-def-static-methods, …
GuillaumeGomez Jan 5, 2024
2a10782
Rollup merge of #119588 - Nemo157:i586-netbsd-tier-3, r=Nilstrieb
GuillaumeGomez Jan 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions compiler/rustc_hir_analysis/src/collect/type_of/opaque.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ pub(super) fn find_opaque_ty_constraints_for_tait(tcx: TyCtxt<'_>, def_id: Local
Node::Item(it) => locator.visit_item(it),
Node::ImplItem(it) => locator.visit_impl_item(it),
Node::TraitItem(it) => locator.visit_trait_item(it),
Node::ForeignItem(it) => locator.visit_foreign_item(it),
other => bug!("{:?} is not a valid scope for an opaque type item", other),
}
}
Expand Down Expand Up @@ -240,6 +241,12 @@ impl<'tcx> intravisit::Visitor<'tcx> for TaitConstraintLocator<'tcx> {
self.check(it.owner_id.def_id);
intravisit::walk_trait_item(self, it);
}
fn visit_foreign_item(&mut self, it: &'tcx hir::ForeignItem<'tcx>) {
trace!(?it.owner_id);
assert_ne!(it.owner_id.def_id, self.def_id);
// No need to call `check`, as we do not run borrowck on foreign items.
intravisit::walk_foreign_item(self, it);
}
}

pub(super) fn find_opaque_ty_constraints_for_rpit<'tcx>(
Expand Down
21 changes: 21 additions & 0 deletions tests/ui/type-alias-impl-trait/nested-in-anon-const.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
// Regression test for issue #119295.

#![feature(type_alias_impl_trait)]

type Bar<T> = T;
type S<const A: usize> = [i32; A];

extern "C" {
pub fn lint_me(
x: Bar<
S<
{ //~ ERROR mismatched types
type B<Z> = impl Sized;
//~^ ERROR unconstrained opaque type
},
>,
>,
);
}

fn main() {}
20 changes: 20 additions & 0 deletions tests/ui/type-alias-impl-trait/nested-in-anon-const.stderr
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
error[E0308]: mismatched types
--> $DIR/nested-in-anon-const.rs:12:17
|
LL | / {
LL | | type B<Z> = impl Sized;
LL | |
LL | | },
| |_________________^ expected `usize`, found `()`

error: unconstrained opaque type
--> $DIR/nested-in-anon-const.rs:13:33
|
LL | type B<Z> = impl Sized;
| ^^^^^^^^^^
|
= note: `B` must be used in combination with a concrete type within the same item

error: aborting due to 2 previous errors

For more information about this error, try `rustc --explain E0308`.
0