Giter VIP home page Giter VIP logo

Comments (10)

lqd avatar lqd commented on August 30, 2024 2

There are also similar older versions of this issue, like the following (playground). That's been warning since 1.57:

use std::mem;

#[repr(transparent)]
pub struct X<T: ?Sized> {
    pub inner: T,
}

pub struct Y {}

impl Drop for Y {
    fn drop(&mut self) {
        type A = Vec<u8>;
        const _: () = assert!(mem::size_of::<X<A>>() == mem::size_of::<A>());
    }
}

Note that this is not a reduction of the OP and not necessarily a duplicate, but was encountered in real world code.

from rust.

IceTDrinker avatar IceTDrinker commented on August 30, 2024 1

warnings are popping up as well, so wrong repo I guess ? is there a way to transfer this issue to rustc ?

from rust.

tgross35 avatar tgross35 commented on August 30, 2024 1

No worries, somebody will chase it down at some point :)

from rust.

mu001999 avatar mu001999 commented on August 30, 2024 1

Regression in rust-lang-ci@4cfe57a
The PR introducing the regression in this rollup is #122382: Detect unused structs which implement private traits


I will have a look

from rust.

Alexendoo avatar Alexendoo commented on August 30, 2024

dead_code comes from rustc, does cargo +nightly-2024-07-18 check --all-targets --features serde exhibit the same behaviour?

from rust.

IceTDrinker avatar IceTDrinker commented on August 30, 2024

checking

from rust.

tgross35 avatar tgross35 commented on August 30, 2024

This will need a smaller reproduction. Any chance you could try extracting the relevant code out?

from rust.

IceTDrinker avatar IceTDrinker commented on August 30, 2024

I don't really have time currently I'm afraid :/ otherwise I could offer an automated bisect on that

from rust.

mu001999 avatar mu001999 commented on August 30, 2024

@rustbot claim

from rust.

mu001999 avatar mu001999 commented on August 30, 2024

Reduced (play):

struct T<X>(X);

type A<X> = T<X>;

trait Tr {
    fn foo();
}

impl<X> Tr for T<A<X>> {
    fn foo() {}
}

fn main() {
   T::<T<()>>::foo();
}

from rust.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.