Skip to content
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

Rollup of 8 pull requests #102948

Merged
merged 51 commits into from
Oct 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
72b3347
use correct location for type tests in promoted consts
b-naber Sep 23, 2022
29cc36f
add test
b-naber Sep 23, 2022
39484ac
Move style guide to rust-lang/rust
joshtriplett Sep 24, 2022
9a9e827
triagebot.toml: Add autolabel for T-style
joshtriplett Sep 24, 2022
283c0e4
style-guide: Remove trailing space
joshtriplett Sep 24, 2022
9a72a66
style-guide: Fix broken links
joshtriplett Sep 24, 2022
69cafc0
always panic for invalid integer logarithm
Oct 2, 2022
6acc29f
add tests for panicking integer logarithms
Oct 2, 2022
b7dae8a
remove unneeded attributes
Oct 2, 2022
bde80f7
Add lint for diagnostic migration
rdvdev2 Aug 22, 2022
2f74d1d
Migrate weak_lang_items.rs
rdvdev2 Aug 22, 2022
17a4a68
Migrate derivable diagnostics in lang_items.rs
rdvdev2 Sep 1, 2022
0315d7c
Migrate derivable diagnostics in check_attr.rs
rdvdev2 Sep 2, 2022
2c3351c
Migrate InvalidAttrAtCrateLevel
rdvdev2 Sep 2, 2022
c24a873
always put ftl message on next line, resolve all but 1 output compari…
CleanCut Sep 21, 2022
b8e03cf
use consistent names
CleanCut Sep 22, 2022
1222541
resolve merge conflict from cherry-picking 6a47326a0452cc8d5cb5767650…
diegooliveira Sep 14, 2022
c103c30
migrate the rest of weak_lang_items.rs to translateable diagnostics
CleanCut Sep 22, 2022
1e86226
migrate debugger_visualizer.rs to translateable diagnostics
CleanCut Sep 22, 2022
f8ebc72
errors: add `emit_note`/`create_note`
davidtwco Sep 1, 2022
3a74833
use cherry-picked commit from #100754 to emit note without error
CleanCut Sep 22, 2022
0609c0f
migrate diagnostic_items.rs to translateable diagnostics
CleanCut Sep 23, 2022
40d5f00
migrate layout_test.rs to translateable diagnostics
CleanCut Sep 23, 2022
c457abe
migrate lib_features.rs to translateable diagnostics
CleanCut Sep 24, 2022
572f341
migrate check_const.rs to translateable diagnostics
CleanCut Sep 24, 2022
69766e4
migrate loops.rs to translateable diagnostics
CleanCut Sep 26, 2022
96f92ea
migrate naked_functions.rs to translateable diagnostics
CleanCut Sep 27, 2022
b17ec43
migrate entry.rs to translateable diagnostics
CleanCut Sep 28, 2022
f0afb88
migrate lang_items.rs to translateable diagnostics
CleanCut Oct 1, 2022
a7aa185
migrate dead.rs to translateable diagnostics
CleanCut Oct 2, 2022
3fe8e00
migrate the rest of check_attr.rs to translateable diagnostics
CleanCut Oct 2, 2022
be4059d
migrate stability.rs to translateable diagnostics
CleanCut Oct 3, 2022
965dbf6
First batch of review feedback changes from #102110
CleanCut Oct 3, 2022
8e07a85
Remove code that was removed in master, and the corresponding diagnostic
CleanCut Oct 5, 2022
57eba4f
avoid string dispatch in fluent
CleanCut Oct 5, 2022
31c269a
avoid string dispatch in fluent
CleanCut Oct 7, 2022
b9e4a1c
use memset to initialize a readbuf
the8472 Oct 8, 2022
50e2795
remove out-of-date fixme
CleanCut Oct 10, 2022
5ef1c03
make up your mind, rustfmt
CleanCut Oct 10, 2022
d933092
Check representability in adt_sized_constraint
camsteffen Oct 10, 2022
b5963f0
rustdoc: remove unused classes from sidebar
notriddle Oct 11, 2022
062284a
rustdoc: remove unneeded `.content` selector from link colors
notriddle Oct 11, 2022
a7f58af
unify `IsPattern` and `IsImport` enum
SparrowLii Oct 12, 2022
32471a7
Rollup merge of #102110 - CleanCut:migrate_rustc_passes_diagnostics, …
Dylan-DPC Oct 12, 2022
5e04567
Rollup merge of #102187 - b-naber:inline-const-source-info, r=eholk
Dylan-DPC Oct 12, 2022
f8723f9
Rollup merge of #102239 - joshtriplett:style-guide, r=calebcartwright
Dylan-DPC Oct 12, 2022
d8091f8
Rollup merge of #102578 - lukas-code:ilog-panic, r=m-ou-se
Dylan-DPC Oct 12, 2022
658169b
Rollup merge of #102811 - the8472:bufread-memset, r=m-ou-se
Dylan-DPC Oct 12, 2022
c8a8e7d
Rollup merge of #102890 - camsteffen:adt-sized-representability, r=cj…
Dylan-DPC Oct 12, 2022
252ce10
Rollup merge of #102913 - SparrowLii:import-candidate, r=compiler-errors
Dylan-DPC Oct 12, 2022
96bcced
Rollup merge of #102924 - notriddle:notriddle/sidebar-link-class, r=G…
Dylan-DPC Oct 12, 2022
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
9 changes: 9 additions & 0 deletions compiler/rustc_borrowck/src/type_check/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
// modify their locations.
let all_facts = &mut None;
let mut constraints = Default::default();
let mut type_tests = Default::default();
let mut closure_bounds = Default::default();
let mut liveness_constraints =
LivenessValues::new(Rc::new(RegionValueElements::new(&promoted_body)));
Expand All @@ -595,6 +596,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
&mut this.cx.borrowck_context.constraints.outlives_constraints,
&mut constraints,
);
mem::swap(&mut this.cx.borrowck_context.constraints.type_tests, &mut type_tests);
mem::swap(
&mut this.cx.borrowck_context.constraints.closure_bounds_mapping,
&mut closure_bounds,
Expand All @@ -619,6 +621,13 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
swap_constraints(self);

let locations = location.to_locations();

// Use location of promoted const in collected constraints
for type_test in type_tests.iter() {
let mut type_test = type_test.clone();
type_test.locations = locations;
self.cx.borrowck_context.constraints.type_tests.push(type_test)
}
for constraint in constraints.outlives().iter() {
let mut constraint = constraint.clone();
constraint.locations = locations;
Expand Down
9 changes: 9 additions & 0 deletions compiler/rustc_error_messages/locales/en-US/middle.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,12 @@ middle_limit_invalid =

middle_const_eval_non_int =
constant evaluation of enum discriminant resulted in non-integer

middle_unknown_layout =
the type `{$ty}` has an unknown layout

middle_values_too_big =
values of the type `{$ty}` are too big for the current architecture

middle_cannot_be_normalized =
unable to determine layout for `{$ty}` because `{$failure_ty}` cannot be normalized
Loading