Skip to content

Conversation

mu001999
Copy link
Contributor

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 14, 2024
@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@mu001999
Copy link
Contributor Author

 error: associated type `Bar` is never used --> library/core/tests/any.rs:137:14 | 136 | trait Foo { | --- associated type in this trait 137 | type Bar; | ^^^ | = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]` 

the code is:

#[test] fn dyn_type_name() { trait Foo { type Bar; } assert_eq!( "dyn core::ops::function::Fn(i32, i32) -> i32", std::any::type_name::<dyn Fn(i32, i32) -> i32>() ); assert_eq!( "dyn coretests::any::dyn_type_name::Foo<Bar = i32> \  + core::marker::Send + core::marker::Sync", std::any::type_name::<dyn Foo<Bar = i32> + Send + Sync>() ); }

seems the assoc type is not marked live if it was used in the trait object.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Jul 29, 2024

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

@bors
Copy link
Collaborator

bors commented Aug 3, 2024

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

@mu001999 mu001999 closed this Aug 4, 2024
@mu001999 mu001999 deleted the dead/enhance-2 branch February 7, 2025 15:11
@mu001999 mu001999 restored the dead/enhance-2 branch September 11, 2025 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.

6 participants