Comments (10)
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.
warnings are popping up as well, so wrong repo I guess ? is there a way to transfer this issue to rustc ?
from rust.
No worries, somebody will chase it down at some point :)
from rust.
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.
dead_code
comes from rustc, does cargo +nightly-2024-07-18 check --all-targets --features serde
exhibit the same behaviour?
from rust.
checking
from rust.
This will need a smaller reproduction. Any chance you could try extracting the relevant code out?
from rust.
I don't really have time currently I'm afraid :/ otherwise I could offer an automated bisect on that
from rust.
@rustbot claim
from rust.
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)
- Did miri spot a concurrency bug taking RwLockWriteGuard? HOT 1
- dead-code false positive on named structs with a never field HOT 11
- compiletest: error if `-Cincremental` is passed in compile-flags in ui tests HOT 2
- compiletest: don't silently accept unsupported directives in test suites
- Type parameter captured inside closure may not live long enough HOT 2
- Error when running windows .exe compiled on linux HOT 6
- global_asm-implemented extern "C" functions are not exported from dylib crates HOT 5
- UdpSocket `recv()` fails after `send()` to a closed port HOT 4
- Compiler crash when trying to compile Zed HOT 9
- The `slice::chunks_exact` iterator does not optimize when the initial slice is non-empty
- Invalid cast error when trying to cast a closure to a function pointer should mention captured variables
- Bad codegen for `non-copy-derived` struct with all `Copy` derived fields HOT 10
- `choose_multiple_weighted` returns unexpect probability of result HOT 1
- Compiler crash when trying to compile a project with a lot of dependencies HOT 1
- `Result::unwrap()` on an `Err` value: ReferencesError(ErrorGuaranteed(())) HOT 1
- rustc fails to prove `Send`ness for an `async` block where a `!Send` value is dropped before an `.await` point HOT 6
- Async Borrowing Issue HOT 1
- compiler/rustc_borrowck/src/borrow_set.rs:250:17: found two uses for 2-phase borrow temporary HOT 6
- Tracking Issue for `unsigned_is_multiple_of`
- Runtime error using f64::sin in `wasm32` HOT 12
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust.