Skip to content

Commit

Permalink
Makefile: do not compile rust/download_web with old toolchain, again
Browse files Browse the repository at this point in the history
rust/download_web now fails on Fedora 39 (rustc 1.37) with:

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> /root/.cargo/registry/src/suiyiyu.us.kg-1ecc6299db9ec823/object-0.19.0/src/pod.rs:35:30
       |
    35 |     let val = unsafe { &*ptr.cast() };
       |                              ^^^^
       |
       = note: for more information, see rust-lang/rust#60602

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> /root/.cargo/registry/src/suiyiyu.us.kg-1ecc6299db9ec823/object-0.19.0/src/pod.rs:53:52
       |
    53 |     let slice = unsafe { slice::from_raw_parts(ptr.cast(), count) };
       |                                                    ^^^^
       |
       = note: for more information, see rust-lang/rust#60602

    error[E0658]: use of unstable library feature 'ptr_cast'
      --> /root/.cargo/registry/src/suiyiyu.us.kg-1ecc6299db9ec823/object-0.19.0/src/pod.rs:65:66
       |
    65 |     unsafe { slice::from_raw_parts(slice::from_ref(val).as_ptr().cast(), size) }
       |                                                                  ^^^^
       |
       = note: for more information, see rust-lang/rust#60602

This feature is
https://doc.bccnsoft.com/docs/rust-1.36.0-docs-html/unstable-book/library-features/ptr-cast.html,
stabilized in rust-lang/rust#62713 merged in
Rust 1.38 (2019-09-26).
  • Loading branch information
fishilico committed May 29, 2020
1 parent 41cdecc commit 3dcd62d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,11 @@ endif
ifneq ($(call can-run,$(CARGO) --version),y)
SUBDIRS_BLACKLIST += rust%
else
# Old versions of rustc fail to build socket2-0.3.12 because:
# Old versions of rustc (<=1.34) fail to build socket2-0.3.12 because:
# error[E0658]: use of unstable library feature 'maybe_uninit' (see issue #53491)
ifeq ($(call can-run,$(RUSTC) --version | grep '^rustc 1\.\(3[0-4]\)\.'),y)
# Old versions of rustc (<1.38) fail to build object-0.19.0 because:
# use of unstable library feature 'ptr_cast'
ifeq ($(call can-run,$(RUSTC) --version | grep '^rustc 1\.\(3[0-7]\)\.'),y)
SUBDIRS_BLACKLIST += rust/download_web%
endif
endif
Expand Down
4 changes: 2 additions & 2 deletions machines/Dockerfile-fedora29
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ COPY . /shared/
CMD ["/run_shared_test.sh"]

# make list-nobuild:
# Global blacklist: latex%
# Global blacklist: latex% rust/download_web%
# In sub-directories:
# c:
# glossaries:
Expand All @@ -74,7 +74,7 @@ CMD ["/run_shared_test.sh"]
# rust:
# verification:
# With gcc -m32:
# Global blacklist: latex%
# Global blacklist: latex% rust/download_web%
# In sub-directories:
# c: gtk_alpha_window
# glossaries:
Expand Down

0 comments on commit 3dcd62d

Please sign in to comment.