Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trait bounds for specific types, type inference failed. #16855

Closed
A4-Tacks opened this issue Mar 16, 2024 · 1 comment
Closed

Trait bounds for specific types, type inference failed. #16855

A4-Tacks opened this issue Mar 16, 2024 · 1 comment
Labels
C-bug Category: bug

Comments

@A4-Tacks
Copy link

rust-analyzer version: rust-analyzer 1.76.0 (07dca48 2024-02-04)

rustc version: rustc 1.76.0 (07dca489a 2024-02-04)

relevant settings: NONE

repository link (if public, optional): NONE

code snippet to reproduce:

use std::borrow::Borrow;

fn f<T>()
where u32: Borrow<T>,
{
    let _x = 1u32.borrow(); // ra: let _x: &{unknown} // size = 8, align = 0x8
    println!("{}", core::any::type_name_of_val(&_x)); // &u32
}
fn main() { f() }
@A4-Tacks A4-Tacks added the C-bug Category: bug label Mar 16, 2024
@lnicola
Copy link
Member

lnicola commented Mar 16, 2024

Duplicate of #5514.

@lnicola lnicola closed this as completed Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants