Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

ices/86132.rs: fixed with errors #824

Merged
merged 1 commit into from
Jun 13, 2021
Merged

ices/86132.rs: fixed with errors #824

merged 1 commit into from
Jun 13, 2021

Conversation

github-actions[bot]
Copy link
Contributor

Issue: rust-lang/rust#86132

#![crate_type = "staticlib"]
use std::mem;
trait Trait {}
const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
    unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };
=== stdout ===
=== stderr ===
warning: trait objects without an explicit `dyn` are deprecated
 --> /home/runner/work/glacier/glacier/ices/86132.rs:4:36
  |
4 | const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
  |                                    ^^^^^ help: use `dyn`: `dyn Trait`
  |
  = note: `#[warn(bare_trait_objects)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
  = note: for more information, see issue #80165 <https://github.com/rust-lang/rust/issues/80165>

warning: constant is never used: `TRAIT_OBJ_UNALIGNED_VTABLE`
 --> /home/runner/work/glacier/glacier/ices/86132.rs:4:1
  |
4 | / const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
5 | |     unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };
  | |____________________________________________________________________^
  |
  = note: `#[warn(dead_code)]` on by default

error: any use of this value will cause an error
 --> /home/runner/work/glacier/glacier/ices/86132.rs:5:14
  |
4 | / const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
5 | |     unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };
  | |______________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^__-
  |                |
  |                invalid vtable: alignment `7` is not a power of 2
  |
  = note: `#[deny(const_err)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #71800 <https://github.com/rust-lang/rust/issues/71800>

error: aborting due to previous error; 2 warnings emitted

==============

=== stdout ===
=== stderr ===
warning: trait objects without an explicit `dyn` are deprecated
 --> /home/runner/work/glacier/glacier/ices/86132.rs:4:36
  |
4 | const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
  |                                    ^^^^^ help: use `dyn`: `dyn Trait`
  |
  = note: `#[warn(bare_trait_objects)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in the 2021 edition!
  = note: for more information, see issue #80165 <rust-lang/rust#80165>

warning: constant is never used: `TRAIT_OBJ_UNALIGNED_VTABLE`
 --> /home/runner/work/glacier/glacier/ices/86132.rs:4:1
  |
4 | / const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
5 | |     unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };
  | |____________________________________________________________________^
  |
  = note: `#[warn(dead_code)]` on by default

error: any use of this value will cause an error
 --> /home/runner/work/glacier/glacier/ices/86132.rs:5:14
  |
4 | / const TRAIT_OBJ_UNALIGNED_VTABLE: &Trait =
5 | |     unsafe { mem::transmute((&92u8, &[0b_______001_11i128; 128])) };
  | |______________^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^__-
  |                |
  |                invalid vtable: alignment `7` is not a power of 2
  |
  = note: `#[deny(const_err)]` on by default
  = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
  = note: for more information, see issue #71800 <rust-lang/rust#71800>

error: aborting due to previous error; 2 warnings emitted

==============
@Alexendoo Alexendoo merged commit 08a01b9 into master Jun 13, 2021
@Alexendoo Alexendoo deleted the autofix/ices/86132.rs branch June 13, 2021 13:10
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants