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

change offset from u32 to u64 #71696

Closed

Conversation

Dylan-DPC-zz
Copy link

@Dylan-DPC-zz Dylan-DPC-zz commented Apr 29, 2020

Changes offset of u32 to u64
Resolves one of eddy's FIXMEs
References #71699

r? @eddyb

@Dylan-DPC-zz
Copy link
Author

Dylan-DPC-zz commented Apr 29, 2020

r? @oli (on eddy's request xD)

meh me

@Dylan-DPC-zz
Copy link
Author

r? @oli-obk

@rust-highfive rust-highfive assigned oli-obk and unassigned eddyb Apr 29, 2020
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/66e1628c-7333-4ac9-af5c-a4f733ef96d9.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71696/merge:refs/remotes/pull/71696/merge
---
 ---> f7353ccad5b1
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> ed38efbaa060
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            /scripts/validate-toolstate.sh
 ---> c5008ef7ae8e
Successfully built c5008ef7ae8e
Successfully tagged rust-ci:latest
Built container sha256:c5008ef7ae8e94d7ef502e3cef26e61208e14ebdb36913f3a8bb86291bd6430b
Built container sha256:c5008ef7ae8e94d7ef502e3cef26e61208e14ebdb36913f3a8bb86291bd6430b
Looks like docker image is the same as before, not uploading
[CI_JOB_NAME=mingw-check]
[CI_JOB_NAME=mingw-check]
== clock drift check ==
  local time: Wed Apr 29 22:16:17 UTC 2020
  network time: Wed, 29 Apr 2020 22:16:17 GMT
Starting sccache server...
configure: processing command line
configure: 
configure: rust.parallel-compiler := True
---
    Checking unicode-width v0.1.6
    Checking getopts v0.2.21
    Checking test v0.0.0 (/checkout/src/libtest)
    Finished release [optimized] target(s) in 27.20s
{"reason":"build-finished","success":true}
    Checking cfg-if v0.1.10
   Compiling libc v0.2.69
   Compiling semver-parser v0.7.0
    Checking scopeguard v1.0.0
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking rustc_attr v0.0.0 (/checkout/src/librustc_attr)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
    Checking rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
    Checking rustc_expand v0.0.0 (/checkout/src/librustc_expand)
error[E0308]: mismatched types
    --> /checkout/src/librustc_data_structures/macros.rs:17:32
     |
15   | / macro_rules! static_assert_size {
16   | |     ($ty:ty, $size:expr) => {
17   | |         const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
     | |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 16 elements, found one with 24 elements
19   | | }
     | |_- in this expansion of `static_assert_size!`
     | 
    ::: src/librustc_middle/mir/mod.rs:1864:1
    ::: src/librustc_middle/mir/mod.rs:1864:1
     |
1864 |   static_assert_size!(PlaceElem<'_>, 16);

    Checking rustc_builtin_macros v0.0.0 (/checkout/src/librustc_builtin_macros)
error[E0308]: mismatched types
    --> src/librustc_middle/mir/mod.rs:2546:52
    --> src/librustc_middle/mir/mod.rs:2546:52
     |
2546 |         self.projs.push(ProjectionElem::Subslice { from, to, from_end: true });
     |                                                    |
     |                                                    expected `u64`, found `u32`
     |                                                    expected `u64`, found `u32`
     |                                                    help: you can convert an `u32` to `u64`: `from: from.into()`
error[E0308]: mismatched types
    --> src/librustc_middle/mir/mod.rs:2546:58
     |
     |
2546 |         self.projs.push(ProjectionElem::Subslice { from, to, from_end: true });
     |                                                          |
     |                                                          expected `u64`, found `u32`
     |                                                          expected `u64`, found `u32`
     |                                                          help: you can convert an `u32` to `u64`: `to: to.into()`
error: aborting due to 3 previous errors

For more information about this error, try `rustc --explain E0308`.
For more information about this error, try `rustc --explain E0308`.
{"reason":"build-finished","success":false}
error: could not compile `rustc_middle`.
To learn more, run the command again with --verbose.
To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:03:47
== clock drift check ==
  local time: Wed Apr 29 22:20:05 UTC 2020
  local time: Wed Apr 29 22:20:05 UTC 2020
  network time: Wed, 29 Apr 2020 22:20:05 GMT


##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71696/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4087) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@@ -53,13 +53,12 @@ pub fn expand_aggregate<'tcx>(
.map(move |(i, (op, ty))| {
let lhs_field = if let AggregateKind::Array(_) = kind {
// FIXME(eddyb) `offset` should be u64.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// FIXME(eddyb) `offset` should be u64.

@@ -675,7 +675,7 @@ where
let tcx = self.tcx();

if let Some(size) = opt_size {
let size: u32 = size.try_into().unwrap_or_else(|_| {
let size: u64 = size.try_into().unwrap_or_else(|_| {
bug!("move out check isn't implemented for array sizes bigger than u32::MAX");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bug!("move out check isn't implemented for array sizes bigger than u32::MAX");
bug!("move out check isn't implemented for array sizes bigger than u64::MAX");

That's what check_if_subslice_element_is_moved does, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This entire check can be removed, opt_size is Option<u64> so the size from if let Some(size) is already u64.

@Mark-Simulacrum
Copy link
Member

We should make sure to run this by perf before landing, as it does change the size of some things that are plausibly in the hot path. I suspect that arrays this size are really slow to compile anyway today, at least if you perform some operations on them (such as moving out).

@Dylan-DPC-zz Dylan-DPC-zz added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Apr 30, 2020
@@ -645,7 +645,7 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
PlaceTy::from_ty(match base_ty.kind {
ty::Array(inner, _) => {
assert!(!from_end, "array subslices should not use from_end");
tcx.mk_array(inner, (to - from) as u64)
tcx.mk_array(inner, (to - from))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unnecessary parens.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
tcx.mk_array(inner, (to - from))
tcx.mk_array(inner, to - from)

let offset = i as u64;
assert_eq!(offset as usize, i);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this dance isn't needed anymore, since usize is at most u64 currently, but cc @RalfJung who removed a bunch of as casts from miri recently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd use u64::try_from(...).unwrap() instead of a manual assert_eq!.

I changed Size::from_bytes so that it does the (checked) cast itself, but here it looks like we need it for ConstantIndex and I didn't touch that.

@@ -1804,7 +1804,7 @@ pub enum ProjectionElem<V, T> {
/// ```
ConstantIndex {
/// index or -index (in Python terms), depending on from_end
offset: u32,
offset: u64,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can now also remove a bunch of conversions around here:

ConstantIndex { offset, min_length, from_end } => {

@Dylan-DPC-zz Dylan-DPC-zz force-pushed the refactor/eddys-fixme branch from 068c50e to 5038a0e Compare May 2, 2020 00:38
@Dylan-DPC-zz Dylan-DPC-zz marked this pull request as draft May 2, 2020 00:39
@Dylan-DPC-zz
Copy link
Author

Marking this as draft till i'm sure I haven't missed anything :D

@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/43d3e591-53a0-4216-a6f5-a42bfee6e4c2.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71696/merge:refs/remotes/pull/71696/merge
---
 ---> f7353ccad5b1
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> ed38efbaa060
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            /scripts/validate-toolstate.sh
 ---> c5008ef7ae8e
Successfully built c5008ef7ae8e
Successfully tagged rust-ci:latest
Built container sha256:c5008ef7ae8e94d7ef502e3cef26e61208e14ebdb36913f3a8bb86291bd6430b
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking rustc_attr v0.0.0 (/checkout/src/librustc_attr)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
    Checking rustc_ast_passes v0.0.0 (/checkout/src/librustc_ast_passes)
    Checking rustc_expand v0.0.0 (/checkout/src/librustc_expand)
error[E0308]: mismatched types
    --> /checkout/src/librustc_data_structures/macros.rs:17:32
     |
15   | / macro_rules! static_assert_size {
16   | |     ($ty:ty, $size:expr) => {
17   | |         const _: [(); $size] = [(); ::std::mem::size_of::<$ty>()];
     | |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an array with a fixed size of 16 elements, found one with 24 elements
19   | | }
     | |_- in this expansion of `static_assert_size!`
     | 
    ::: src/librustc_middle/mir/mod.rs:1864:1
    ::: src/librustc_middle/mir/mod.rs:1864:1
     |
1864 |   static_assert_size!(PlaceElem<'_>, 16);

    Checking rustc_builtin_macros v0.0.0 (/checkout/src/librustc_builtin_macros)
error: aborting due to previous error


For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustc_middle`.

To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:03:55
== clock drift check ==
  local time: Sat May  2 00:46:18 UTC 2020
  local time: Sat May  2 00:46:18 UTC 2020
  network time: Sat, 02 May 2020 00:46:18 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71696/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4216) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@Dylan-DPC-zz Dylan-DPC-zz force-pushed the refactor/eddys-fixme branch from 5038a0e to 9f39396 Compare May 2, 2020 13:17
@rust-highfive
Copy link
Collaborator

The job mingw-check of your PR failed (pretty log, raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
========================== Starting Command Output ===========================
[command]/bin/bash --noprofile --norc /home/vsts/work/_temp/2c4d3c32-4dcc-49d9-b70c-755ffb9aef11.sh

##[section]Finishing: Disable git automatic line ending conversion
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
---
##[command]git remote add origin https://github.com/rust-lang/rust
##[command]git config gc.auto 0
##[command]git config --get-all http.https://github.com/rust-lang/rust.extraheader
##[command]git config --get-all http.proxy
##[command]git -c http.extraheader="AUTHORIZATION: basic ***" fetch --force --tags --prune --progress --no-recurse-submodules --depth=2 origin +refs/heads/*:refs/remotes/origin/* +refs/pull/71696/merge:refs/remotes/pull/71696/merge
---
 ---> f7353ccad5b1
Step 6/7 : ENV RUN_CHECK_WITH_PARALLEL_QUERIES 1
 ---> Using cache
 ---> ed38efbaa060
Step 7/7 : ENV SCRIPT python3 ../x.py test src/tools/expand-yaml-anchors &&            python3 ../x.py check --target=i686-pc-windows-gnu --host=i686-pc-windows-gnu &&            python3 ../x.py build --stage 0 src/tools/build-manifest &&            python3 ../x.py test --stage 0 src/tools/compiletest &&            python3 ../x.py test src/tools/tidy &&            /scripts/validate-toolstate.sh
 ---> c5008ef7ae8e
Successfully built c5008ef7ae8e
Successfully tagged rust-ci:latest
Built container sha256:c5008ef7ae8e94d7ef502e3cef26e61208e14ebdb36913f3a8bb86291bd6430b
---
    Checking rustc_feature v0.0.0 (/checkout/src/librustc_feature)
    Checking fmt_macros v0.0.0 (/checkout/src/libfmt_macros)
    Checking rustc_ast_pretty v0.0.0 (/checkout/src/librustc_ast_pretty)
    Checking rustc_hir v0.0.0 (/checkout/src/librustc_hir)
    Checking rustc_query_system v0.0.0 (/checkout/src/librustc_query_system)
    Checking rustc_attr v0.0.0 (/checkout/src/librustc_attr)
    Checking rustc_parse v0.0.0 (/checkout/src/librustc_parse)
    Checking rustc_hir_pretty v0.0.0 (/checkout/src/librustc_hir_pretty)
    Checking rustc_ast_lowering v0.0.0 (/checkout/src/librustc_ast_lowering)
---
    Checking rustc_mir v0.0.0 (/checkout/src/librustc_mir)
error: unnecessary parentheses around method argument
   --> src/librustc_mir/borrow_check/type_check/mod.rs:648:45
    |
648 |                         tcx.mk_array(inner, (to - from))
    |
    = note: `-D unused-parens` implied by `-D warnings`

error[E0053]: method `array_subpath` has an incompatible type for trait
error[E0053]: method `array_subpath` has an incompatible type for trait
   --> src/librustc_mir/shim.rs:310:56
    |
310 |     fn array_subpath(&self, _path: Self::Path, _index: u32, _size: u32) -> Option<Self::Path> {
    | 
   ::: src/librustc_mir/util/elaborate_drops.rs:91:54
    |
    |
91  |     fn array_subpath(&self, path: Self::Path, index: u64, size: u64) -> Option<Self::Path>;
    |                                                      --- type in trait
    |
    = note: expected fn pointer `fn(&shim::DropShimElaborator<'a, 'tcx>, (), u64, u64) -> std::option::Option<_>`
               found fn pointer `fn(&shim::DropShimElaborator<'a, 'tcx>, (), u32, u32) -> std::option::Option<_>`
error[E0308]: mismatched types
  --> src/librustc_mir/util/aggregate.rs:61:37
   |
61 |                         min_length: offset + 1,
61 |                         min_length: offset + 1,
   |                                     ^^^^^^^^^^ expected `u32`, found `u64`

error[E0308]: mismatched types
   --> src/librustc_mir/borrow_check/places_conflict.rs:452:52
    |
452 |             if *offset_from_begin >= *min_length - *offset_from_end {

error[E0308]: mismatched types
   --> src/librustc_mir/borrow_check/places_conflict.rs:452:38
    |
    |
452 |             if *offset_from_begin >= *min_length - *offset_from_end {
    |                                      |
    |                                      expected `u64`, found `u32`
    |                                      expected `u64`, found `u32`
    |                                      help: you can convert an `u32` to `u64`: `(*min_length - *offset_from_end).into()`

error[E0277]: cannot subtract `u64` from `u32`
   --> src/librustc_mir/borrow_check/places_conflict.rs:452:50
    |
452 |             if *offset_from_begin >= *min_length - *offset_from_end {
    |                                                  ^ no implementation for `u32 - u64`
    |
    = help: the trait `std::ops::Sub<u64>` is not implemented for `u32`
error[E0308]: mismatched types
   --> src/librustc_mir/interpret/place.rs:549:53
    |
    |
549 |                     assert!(0 < offset && offset <= min_length);
    |                                                     |
    |                                                     expected `u64`, found `u32`
    |                                                     expected `u64`, found `u32`
    |                                                     help: you can convert an `u32` to `u64`: `min_length.into()`
error[E0308]: mismatched types
   --> src/librustc_mir/interpret/place.rs:552:38
    |
    |
552 |                     assert!(offset < min_length);
    |                                      |
    |                                      expected `u64`, found `u32`
    |                                      expected `u64`, found `u32`
    |                                      help: you can convert an `u32` to `u64`: `min_length.into()`
    Checking rustc_passes v0.0.0 (/checkout/src/librustc_passes)
error[E0308]: mismatched types
   --> src/librustc_mir/util/elaborate_drops.rs:688:45
    |
---
warning: build failed, waiting for other jobs to finish...
error[E0308]: mismatched types
   --> src/librustc_mir_build/build/matches/mod.rs:598:86
    |
598 |                     self.visit_bindings(subpattern, pattern_user_ty.clone().subslice(from, to), f);
    |                                                                                      |
    |                                                                                      expected `u64`, found `u32`
    |                                                                                      expected `u64`, found `u32`
    |                                                                                      help: you can convert an `u32` to `u64`: `from.into()`
error[E0308]: mismatched types
   --> src/librustc_mir_build/build/matches/mod.rs:598:92
    |
    |
598 |                     self.visit_bindings(subpattern, pattern_user_ty.clone().subslice(from, to), f);
    |                                                                                            |
    |                                                                                            expected `u64`, found `u32`
    |                                                                                            expected `u64`, found `u32`
    |                                                                                            help: you can convert an `u32` to `u64`: `to.into()`
error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:43:57
   |
   |
43 |                 ProjectionElem::ConstantIndex { offset: idx as u32, min_length, from_end: false };

error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:53:27
   |
   |
53 |                     from: prefix.len() as u32,
   |                           ^^^^^^^^^^^^^^^^^^^ expected `u64`, found `u32`

error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:54:41
   |
54 |                     to: if exact_size { min_length - suffix_len } else { suffix_len },
   |                                         |
   |                                         expected `u64`, found `u32`
   |                                         expected `u64`, found `u32`
   |                                         help: you can convert an `u32` to `u64`: `(min_length - suffix_len).into()`
error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:54:74
   |
   |
54 |                     to: if exact_size { min_length - suffix_len } else { suffix_len },
   |                                                                          |
   |                                                                          expected `u64`, found `u32`
   |                                                                          expected `u64`, found `u32`
   |                                                                          help: you can convert an `u32` to `u64`: `suffix_len.into()`
error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:64:41
   |
   |
64 |                 offset: if exact_size { min_length - end_offset } else { end_offset },
   |                                         |
   |                                         expected `u64`, found `u32`
   |                                         expected `u64`, found `u32`
   |                                         help: you can convert an `u32` to `u64`: `(min_length - end_offset).into()`
error[E0308]: mismatched types
  --> src/librustc_mir_build/build/matches/util.rs:64:74
   |
   |
64 |                 offset: if exact_size { min_length - end_offset } else { end_offset },
   |                                                                          |
   |                                                                          expected `u64`, found `u32`
   |                                                                          expected `u64`, found `u32`
   |                                                                          help: you can convert an `u32` to `u64`: `end_offset.into()`
error: aborting due to 8 previous errors

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rustc_mir_build`.
error: could not compile `rustc_mir_build`.

To learn more, run the command again with --verbose.
command did not execute successfully: "/checkout/obj/build/x86_64-unknown-linux-gnu/stage0/bin/cargo" "check" "--target" "x86_64-unknown-linux-gnu" "-Zbinary-dep-depinfo" "-j" "2" "--release" "--color" "always" "--features" " llvm" "--manifest-path" "/checkout/src/rustc/Cargo.toml" "--message-format" "json-render-diagnostics"
failed to run: /checkout/obj/build/bootstrap/debug/bootstrap check
Build completed unsuccessfully in 0:05:05
== clock drift check ==
  local time: Sat May  2 13:25:42 UTC 2020
  local time: Sat May  2 13:25:42 UTC 2020
  network time: Sat, 02 May 2020 13:25:43 GMT
== end clock drift check ==

##[error]Bash exited with code '1'.
##[section]Finishing: Run build
##[section]Starting: Checkout rust-lang/rust@refs/pull/71696/merge to s
Task         : Get sources
Description  : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version      : 1.0.0
Author       : Microsoft
Author       : Microsoft
Help         : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Cleaning any cached credential from repository: rust-lang/rust (GitHub)
##[section]Finishing: Checkout rust-lang/rust@refs/pull/71696/merge to s
Cleaning up task key
Start cleaning up orphan processes.
Terminate orphan process: pid (4758) (python)
##[section]Finishing: Finalize Job

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @rust-lang/infra. (Feature Requests)

@@ -1861,7 +1861,7 @@ impl<'tcx> Copy for PlaceElem<'tcx> {}

// At least on 64 bit systems, `PlaceElem` should not be larger than two pointers.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR seems to make this comment out of date?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm changing it, I haven't pushed it yet

@bors
Copy link
Contributor

bors commented May 19, 2020

☔ The latest upstream changes (presumably #72330) made this pull request unmergeable. Please resolve the merge conflicts.

@Muirrum
Copy link
Member

Muirrum commented Jul 16, 2020

@Dylan-DPC this is a triage bump.

@Dylan-DPC-zz
Copy link
Author

closing in favour of #74848

@Dylan-DPC-zz Dylan-DPC-zz removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Jul 27, 2020
@Dylan-DPC-zz Dylan-DPC-zz added the S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs. label Jul 27, 2020
bors added a commit to rust-lang-ci/rust that referenced this pull request Aug 26, 2020
change offset from u32 to u64

References rust-lang#71696

r? @oli-obk

(closed the earlier pr because the rebase got messed up)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-inactive Status: Inactive and waiting on the author. This is often applied to closed PRs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.