mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-01 11:31:15 +00:00
Add a test case
This commit is contained in:
parent
5384dd8947
commit
913ec54f84
@ -3062,6 +3062,30 @@ fn f() {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn into_call_to_from_definition_with_trait_bounds() {
|
||||||
|
check(
|
||||||
|
r#"
|
||||||
|
//- minicore: from, iterator
|
||||||
|
struct A;
|
||||||
|
|
||||||
|
impl<T> From<T> for A
|
||||||
|
where
|
||||||
|
T: IntoIterator<Item = i64>,
|
||||||
|
{
|
||||||
|
fn from(value: T) -> Self {
|
||||||
|
//^^^^
|
||||||
|
A
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
fn f() {
|
||||||
|
let a: A = [1, 2, 3].into$0();
|
||||||
|
}
|
||||||
|
"#,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn goto_into_definition_if_exists() {
|
fn goto_into_definition_if_exists() {
|
||||||
check(
|
check(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user