We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d54c55 commit 1d782a9Copy full SHA for 1d782a9
crates/hir-ty/src/tests/method_resolution.rs
@@ -1896,3 +1896,24 @@ impl dyn Error + Send {
1896
"#,
1897
);
1898
}
1899
+
1900
+#[test]
1901
+fn fallback_private_methods() {
1902
+ check(
1903
+ r#"
1904
+mod module {
1905
+ pub struct Struct;
1906
1907
+ impl Struct {
1908
+ fn func(&self) {}
1909
+ }
1910
+}
1911
1912
+fn foo() {
1913
+ let s = module::Struct;
1914
+ s.func();
1915
+ //^^^^^^^^ type: ()
1916
1917
+"#,
1918
+ );
1919
0 commit comments