mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 08:13:41 +00:00
Add test for issue
This commit is contained in:
parent
af001677d1
commit
204c8de3bf
@ -534,6 +534,35 @@ fn foo(b: Bar) {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_4235_name_conflicts() {
|
||||
assert_snapshot!(
|
||||
infer(r#"
|
||||
struct FOO {}
|
||||
static FOO:FOO = FOO {};
|
||||
|
||||
impl FOO {
|
||||
fn foo(&self) {}
|
||||
}
|
||||
|
||||
fn main() {
|
||||
let a = &FOO;
|
||||
a.foo();
|
||||
}
|
||||
"#), @r###"
|
||||
32..38 'FOO {}': FOO
|
||||
64..68 'self': &FOO
|
||||
70..72 '{}': ()
|
||||
86..120 '{ ...o(); }': ()
|
||||
96..97 'a': &FOO
|
||||
100..104 '&FOO': &FOO
|
||||
101..104 'FOO': FOO
|
||||
110..111 'a': &FOO
|
||||
110..117 'a.foo()': ()
|
||||
"###
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn issue_4053_diesel_where_clauses() {
|
||||
assert_snapshot!(
|
||||
|
Loading…
Reference in New Issue
Block a user